Commit a2691e19 authored by Julien Malik's avatar Julien Malik

ENH: hide internal cmake vars

parent 1ab8f524
......@@ -65,6 +65,7 @@ ADD_DEFINITIONS(
# Pedantic mode
SET(OTB_BUILD_PEDANTIC OFF CACHE BOOL
"Choose compilation in pedantic or relaxed mode")
MARK_AS_ADVANCED(OTB_BUILD_PEDANTIC)
IF(OTB_BUILD_PEDANTIC)
IF(WIN32)
......
......@@ -60,6 +60,7 @@ ENDIF(WIN32)
IF(UNIX)
INCLUDE(FindX11)
FIND_LIBRARY(FLTK_MATH_LIBRARY m)
MARK_AS_ADVANCED(FLTK_MATH_LIBRARY)
SET( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} ${FLTK_MATH_LIBRARY})
ENDIF(UNIX)
......@@ -124,6 +125,7 @@ IF(NOT FLTK_DIR)
# Help the user find it if we cannot.
DOC "The ${FLTK_DIR_STRING}"
)
MARK_AS_ADVANCED(FLTK_DIR)
ENDIF(NOT FLTK_DIR)
# Check if FLTK was built using CMake
......@@ -147,9 +149,11 @@ IF(FLTK_BUILT_WITH_CMAKE) # FLTK was build using CMak
SET(FLTK_EXTERNAL_VERSION
"${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}.${FLTK_VERSION_PATCH}"
CACHE STRING "FLTK external version used")
MARK_AS_ADVANCED(FLTK_EXTERNAL_VERSION)
# Fluid executable
SET(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable")
MARK_AS_ADVANCED(FLTK_FLUID_EXECUTABLE)
SET(FLTK_INCLUDE_DIR ${FLTK_DIR}) ## ???
LINK_DIRECTORIES(${FLTK_LIBRARY_DIRS})
......
......@@ -109,7 +109,6 @@ FIND_LIBRARY(OPENTHREADS_LIBRARY
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
)
FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG
NAMES OpenThreadsd OpenThreadsWin32d
PATHS
......
......@@ -7,6 +7,7 @@ MARK_AS_ADVANCED(OTB_USE_EXTERNAL_BOOST)
IF(OTB_USE_EXTERNAL_BOOST)
# Import the package
FIND_PACKAGE(Boost)
MARK_AS_ADVANCED(Boost_DIR)
IF(Boost_FOUND)
MESSAGE(STATUS " Found Boost version ${Boost_VERSION}")
IF( ${Boost_MINOR_VERSION} LESS 35)
......
......@@ -6,11 +6,14 @@ MARK_AS_ADVANCED(OTB_USE_EXTERNAL_GDAL)
IF(OTB_USE_EXTERNAL_GDAL)
FIND_PACKAGE(GDAL)
MARK_AS_ADVANCED(GDAL_CONFIG)
IF (NOT GDAL_FOUND)
FIND_PATH(GDAL_INCLUDE_DIR NAMES gdal.h PATHS $ENV{GDAL_INCLUDE_DIR} /usr/include/gdal ${OSGEO4W_INCLUDE})
FIND_LIBRARY(GDAL_LIBRARY NAMES gdal gdal_i PATHS /usr/lib/gdal ${OSGEO4W_LIB})
ENDIF(NOT GDAL_FOUND)
MARK_AS_ADVANCED(GDAL_INCLUDE_DIR)
MARK_AS_ADVANCED(GDAL_LIBRARY)
IF (NOT GDAL_INCLUDE_DIR)
MESSAGE(FATAL_ERROR
......@@ -29,6 +32,7 @@ IF(OTB_USE_EXTERNAL_GDAL)
IF(NOT WIN32)
# Find gdal version with gdal-config
FIND_PROGRAM(GDALCONFIG_EXECUTABLE gdal-config)
MARK_AS_ADVANCED(GDALCONFIG_EXECUTABLE)
IF (NOT EXISTS ${GDALCONFIG_EXECUTABLE})
MESSAGE(FATAL_ERROR "gdal-config not found or set to a wrong path. Please check GDALCONFIG_EXECUTABLE")
ENDIF(NOT EXISTS ${GDALCONFIG_EXECUTABLE})
......@@ -58,6 +62,7 @@ IF(OTB_USE_EXTERNAL_GDAL)
# Find geotiff headers
FIND_PATH(GEOTIFF_INCLUDE_DIRS geotiff.h $ENV{GDAL_INCLUDE_DIR} ${GDAL_INCLUDE_DIR} ${OSGEO4W_INCLUDE} /usr/include/geotiff /usr/include/libgeotiff)
MARK_AS_ADVANCED(GEOTIFF_INCLUDE_DIRS)
IF (NOT GEOTIFF_INCLUDE_DIRS)
MESSAGE(FATAL_ERROR
"Cannot find geotiff headers. Please set GEOTIFF_INCLUDE_DIRS.")
......@@ -66,6 +71,7 @@ IF(OTB_USE_EXTERNAL_GDAL)
# Find tiff headers
FIND_PATH(TIFF_INCLUDE_DIRS tiffio.h $ENV{GDAL_INCLUDE_DIR} ${GDAL_INCLUDE_DIR} ${OSGEO4W_INCLUDE} /usr/include)
MARK_AS_ADVANCED(TIFF_INCLUDE_DIRS)
IF (NOT TIFF_INCLUDE_DIRS)
MESSAGE(FATAL_ERROR
"Cannot find libtiff headers. Please set TIFF_INCLUDE_DIRS.")
......@@ -74,6 +80,7 @@ IF(OTB_USE_EXTERNAL_GDAL)
# Find jpeg headers
FIND_PATH(JPEG_INCLUDE_DIRS jpeglib.h $ENV{GDAL_INCLUDE_DIR} ${GDAL_INCLUDE_DIR} ${OSGEO4W_INCLUDE} /usr/include)
MARK_AS_ADVANCED(JPEG_INCLUDE_DIRS)
IF (NOT JPEG_INCLUDE_DIRS)
MESSAGE(FATAL_ERROR
"Cannot find jpeg headers. Please set JPEG_INCLUDE_DIRS.")
......@@ -82,6 +89,7 @@ IF(OTB_USE_EXTERNAL_GDAL)
# Find ogr headers
FIND_PATH(OGR_INCLUDE_DIRS ogrsf_frmts.h $ENV{GDAL_INCLUDE_DIR} ${GDAL_INCLUDE_DIR} ${OSGEO4W_INCLUDE} /usr/include)
MARK_AS_ADVANCED(OGR_INCLUDE_DIRS)
IF (NOT OGR_INCLUDE_DIRS)
MESSAGE(FATAL_ERROR
"Cannot find ogr headers. Please set OGR_INCLUDE_DIRS.")
......@@ -100,6 +108,7 @@ IF(OTB_USE_EXTERNAL_GDAL)
ELSE(GDAL_HAS_TIFF)
MESSAGE(STATUS " Testing if GDAL has tiff -- no")
FIND_LIBRARY(TIFF_LIBRARY NAMES tiff libtiff_i PATHS ${OSGEO4W_LIB})
MARK_AS_ADVANCED(TIFF_LIBRARY)
IF (NOT TIFF_LIBRARY)
MESSAGE(FATAL_ERROR
"Cannot find tiff library. Please set TIFF_LIBRARY.")
......@@ -118,6 +127,7 @@ IF(OTB_USE_EXTERNAL_GDAL)
ELSE(GDAL_HAS_GEOTIFF)
MESSAGE(STATUS " Testing if GDAL has geotiff -- no")
FIND_LIBRARY(GEOTIFF_LIBRARY NAMES geotiff geotiff_i PATHS ${OSGEO4W_LIB})
MARK_AS_ADVANCED(GEOTIFF_LIBRARY)
IF (NOT GEOTIFF_LIBRARY)
MESSAGE(FATAL_ERROR
"Cannot find geotiff library. Please set GEOTIFF_LIBRARY.")
......
MESSAGE(STATUS "Importing GetText...")
OPTION(OTB_USE_GETTEXT "Get Text Library." OFF)
MARK_AS_ADVANCED(OTB_USE_GETTEXT)
IF(OTB_USE_GETTEXT)
......
MESSAGE(STATUS "Importing Jpeg2000...")
# Use the openjpeg library.
OPTION(OTB_USE_JPEG2000 "Use to support jpeg2000 image file format." ON)
MARK_AS_ADVANCED(OTB_USE_JPEG2000)
IF(OTB_USE_JPEG2000)
MESSAGE(STATUS " Enabling Jpeg2000 support")
......
......@@ -8,6 +8,10 @@ ELSE(EXISTS "${CMAKE_ROOT}/Modules/FindOpenThreads.cmake")
INCLUDE(${OTB_SOURCE_DIR}/CMake/FindOpenThreads.cmake)
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/FindOpenThreads.cmake")
MARK_AS_ADVANCED(OPENTHREADS_INCLUDE_DIR)
MARK_AS_ADVANCED(OPENTHREADS_LIBRARY)
MARK_AS_ADVANCED(OPENTHREADS_LIBRARY_DEBUG)
SET(OTB_USE_EXTERNAL_OPENTHREADS ON CACHE INTERNAL "")
IF(OPENTHREADS_FOUND)
......@@ -31,4 +35,4 @@ ELSE(OPENTHREADS_FOUND)
MESSAGE(STATUS " Using OpenThreads internal version")
ENDIF(OPENTHREADS_FOUND)
\ No newline at end of file
ENDIF(OPENTHREADS_FOUND)
......@@ -8,7 +8,9 @@ IF(OTB_USE_EXTERNAL_OSSIM)
IF (NOT OSSIM_FOUND)
FIND_PATH(OSSIM_INCLUDE_DIR NAMES ossim/init/ossimInit.h PATHS $ENV{OSSIM_INCLUDE_DIR} /usr/local)
MARK_AS_ADVANCED(OSSIM_INCLUDE_DIR)
FIND_LIBRARY(OSSIM_LIBRARY NAMES ossim PATHS /usr/local/lib/ossim)
MARK_AS_ADVANCED(OSSIM_LIBRARY)
ENDIF(NOT OSSIM_FOUND)
IF (NOT OSSIM_INCLUDE_DIR)
......
......@@ -2,6 +2,7 @@ MESSAGE(STATUS "Importing Qt...")
IF(OTB_WRAP_QT)
FIND_PACKAGE(Qt4 REQUIRED)
MARK_AS_ADVANCED(QT_QMAKE_EXECUTABLE)
SET(QT_USE_QTXML 1)
INCLUDE(${QT_USE_FILE})
ENDIF(OTB_WRAP_QT)
......
......@@ -56,7 +56,7 @@ OPTION(BUILD_TESTING "Build testing." OFF)
OPTION(BUILD_EXAMPLES "Build the Examples directory." OFF)
OPTION(BUILD_APPLICATIONS "Build applications" OFF)
OPTION(BUILD_BUG_TRACKER_TESTS "Build failing tests showing bugs" OFF)
MARK_AS_ADVANCED(BUILD_BUG_TRACKER_TESTS)
INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake)
CONFIGURE_FILE(CMake/CTestCustom.cmake.in CTestCustom.cmake)
MARK_AS_ADVANCED(TCL_TCLSH DART_ROOT)
......
......@@ -15,6 +15,10 @@ endmacro()
#
if ( OTB_WRAP_LUA OR OTB_WRAP_PYTHON OR OTB_WRAP_JAVA OR OTB_WRAP_CSHARP OR OTB_WRAP_TCL OR OTB_WRAP_R OR OTB_WRAP_RUBY )
find_package ( SWIG REQUIRED )
mark_as_advanced(SWIG_DIR)
mark_as_advanced(SWIG_EXECUTABLE)
mark_as_advanced(SWIG_VERSION)
include ( UseSWIGLocal )
set_source_files_properties ( otbApplication.i PROPERTIES CPLUSPLUS ON )
......
......@@ -14,6 +14,10 @@ IF(NOT OTB_USE_EXTERNAL_ITK)
ENDIF(NOT OTB_USE_DEPRECATED)
MESSAGE(STATUS "Configuring ITK...")
ADD_SUBDIRECTORY(ITK)
MARK_AS_ADVANCED(FFTW_INCLUDE_PATH)
MARK_AS_ADVANCED(FFTWF_THREADS_LIB)
MARK_AS_ADVANCED(FFTWD_THREADS_LIB)
MARK_AS_ADVANCED(ITK_USE_KWSTYLE)
ENDIF(NOT OTB_USE_EXTERNAL_ITK)
IF(NOT OTB_USE_EXTERNAL_OPENTHREADS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment