Commit 60c189b9 authored by Julien Michel's avatar Julien Michel

MRG

parents a95d80dd 522e2849

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -64,17 +64,21 @@ int main(int argc, char* argv[])
std::string language = "en_EN.UTF-8";
/** Write parameters to the configuration file*/
os << "#Auto generated by config-properties \n"
os << "# Auto generated by config-properties \n\n"
<< "# Language for the GUI application based on otb\n"
<< "# for example OTB_LANG=en_EN.UTF-8\n"
<< "OTB_LANG="
<< language
<< "\n"
<< "\n\n"
<< "# Image size (in byte) to activate the streaming\n"
<< "OTB_STREAM_IMAGE_SIZE_TO_ACTIVATE_STREAMING="
<< paramVector[0]
<< "\n"
<< "\n\n"
<< "# Buffer size when the streaming is activated\n"
<< "OTB_STREAM_MAX_SIZE_BUFFER_FOR_STREAMING="
<< paramVector[1]
<< "\n"
<< "#End of config file properties generation"
<< "\n\n"
<< "#End of config file properties generation\n"
<< std::endl;
os.close();
......
# This is the root OTB CMakeLists file.
# $Id$
#
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
PROJECT(OTB)
# Path to additional CMake modules
SET(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/CMake
${CMAKE_MODULE_PATH})
INCLUDE_REGULAR_EXPRESSION("^(otb|itk|vtk|vnl|vcl|vxl|f2c|netlib|ce|itpack|DICOM|meta|png|dbh|tif|jpeg|zlib).*$")
SOURCE_GROUP("XML Files" REGULAR_EXPRESSION "[.]xml$")
INCLUDE(CMakeDependentOption)
# On Visual Studio 8 MS deprecated C. This removes all 1.276E1265 security
# warnings
......@@ -100,19 +106,19 @@ IF(WIN32)
IF (MSVC)
IF(OTB_BUILD_PEDANTIC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
ENDIF()
ENDIF(OTB_BUILD_PEDANTIC)
IF (MSVC80)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_WARNING)
ENDIF()
ENDIF()
ELSE()
ENDIF(MSVC80)
ENDIF(MSVC)
ELSE(WIN32)
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
IF(OTB_BUILD_PEDANTIC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
ENDIF()
ENDIF()
ENDIF(OTB_BUILD_PEDANTIC)
ENDIF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
ENDIF(WIN32)
#-----------------------------------------------------------------------------
......@@ -225,7 +231,7 @@ ENDIF(OTB_COMPILE_JPEG2000)
IF(EXISTS "${CMAKE_ROOT}/Modules/FindOpenThreads.cmake")
FIND_PACKAGE(OpenThreads)
ELSE(EXISTS "${CMAKE_ROOT}/Modules/FindOpenThreads.cmake")
INCLUDE(${OTB_SOURCE_DIR}/FindOpenThreads.cmake)
INCLUDE(${OTB_SOURCE_DIR}/CMake/FindOpenThreads.cmake)
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/FindOpenThreads.cmake")
SET(OTB_USE_EXTERNAL_OPENTHREADS 1 CACHE INTERNAL "")
......@@ -281,50 +287,49 @@ IF(OTB_USE_VISU_GUI)
#-------------------------------
# FLTK Library
#-------------------------------
#OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." OFF)
FIND_PACKAGE(FLTK)
IF(FLTK_FOUND)
OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." ON)
ELSE(FLTK_FOUND)
OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." OFF)
ENDIF(FLTK_FOUND)
CMAKE_DEPENDENT_OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." ON
"FLTK_FOUND" OFF)
# IF(FLTK_FOUND)
# SET(OTB_USE_EXTERNAL_FLTK ON)
# ELSE(FLTK_FOUND)
# SET(OTB_USE_EXTERNAL_FLTK OFF)
# ENDIF(FLTK_FOUND)
# Option for internal/external FLTK
MARK_AS_ADVANCED(OTB_USE_EXTERNAL_FLTK)
# Add an option to use or not use FLTK (http://www.fltk.org)
IF(OTB_USE_EXTERNAL_FLTK)
# FIND_PACKAGE(FLTK)
# Mingw Option doesn't exist in the FindFLTK.cmake default configuration file in CMake installationj directory.
# Copy FLTK_PLATFORM_DEPENDENT_LIBS from FLTK CmakeList.txt
IF(MINGW)
ADD_DEFINITIONS(-DWIN32)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid wsock32 gdi32 comdlg32)
ENDIF(MINGW)
IF (NOT FLTK_INCLUDE_DIR)
SET( FLTK_INCLUDE_DIR /usr/include )
FIND_PACKAGE(FLTK)
ENDIF(NOT FLTK_INCLUDE_DIR)
IF(FLTK_FOUND)
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIRS})
LINK_DIRECTORIES(${FLTK_LIBRARY_DIRS})
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
ELSE(FLTK_FOUND)
MESSAGE(FATAL_ERROR
MESSAGE(FATAL_ERROR
"Cannot build OTB project without FLTK. Please set FLTK_DIR or set OTB_USE_VISU to OFF or set OTB_USE_EXTERNAL_FLTK OFF to use INTERNAL FLTK set on OTB/Utilities repository.")
ENDIF(FLTK_FOUND)
ELSE(OTB_USE_EXTERNAL_FLTK)
SET(FLTK_INCLUDE_DIR "")
SET(FLTK_LIBRARIES "")
SET( FLTK_PLATFORM_DEPENDENT_LIBS "")
IF(EXISTS "${OTB_BINARY_DIR}/Utilities/FLTK/FLTKConfig.cmake")
INCLUDE(${OTB_BINARY_DIR}/Utilities/FLTK/FLTKConfig.cmake)
ENDIF(EXISTS "${OTB_BINARY_DIR}/Utilities/FLTK/FLTKConfig.cmake")
#----------------------------------------------------------------
# RESUME Alls VISU GUI libraries use by OTB in a single VARIABLE
SET(OTB_VISU_GUI_LIBRARIES "${FLTK_LIBRARIES};${OPENGL_LIBRARIES} ")
SET(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND})
INCLUDE(${OTB_BINARY_DIR}/Utilities/FLTK/FLTKConfig.cmake)
ENDIF(OTB_USE_EXTERNAL_FLTK)
SET(OTB_VISU_GUI_LIBRARIES "${FLTK_LIBRARIES};${OPENGL_LIBRARIES} ")
SET(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND})
ENDIF(OTB_USE_VISU_GUI)
#-------------------------------
......@@ -587,7 +592,7 @@ IF(OTB_USE_EXTERNAL_GDAL)
ENDIF (NOT JPEG_LIBRARY)
ENDIF(GDAL_HAS_JPEG)
# Check if ${GDAL_LIBRARY} has jpeg library
# Check if ${GDAL_LIBRARY} has ogr library
TRY_COMPILE(GDAL_HAS_OGR
${CMAKE_CURRENT_BINARY_DIR}/CMake
${CMAKE_CURRENT_SOURCE_DIR}/CMake/TestGDALHasOGR.cxx
......@@ -611,10 +616,26 @@ ENDIF(OTB_USE_EXTERNAL_GDAL)
#Experimental
FIND_PACKAGE(Gettext)
IF(GETTEXT_FOUND)
SET(OTB_I18N 1)
SET(OTB_LANG $ENV{LANG} CACHE STRING "OTB internationalization (Experimental)")#might want to get the Locale from the system here
SET(OTB_LANG_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/I18n)
SUBDIRS(I18n)
FIND_LIBRARY(GETTEXT_LIBRARY gettextlib DOC "GetText library")
IF(APPLE OR WIN32)
FIND_LIBRARY(GETTEXT_INTL_LIBRARY intl DOC "GetText intl library")
ENDIF(APPLE OR WIN32)
IF(GETTEXT_LIBRARY)
SET(OTB_I18N 1)
SET(OTB_LANG $ENV{LANG} CACHE STRING "OTB internationalization (Experimental)")#might want to get the Locale from the system here
SET(OTB_LANG_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/I18n)
ADD_S