Commit 8a5cba37 authored by Julien Malik's avatar Julien Malik

ENH: outputs an error when an external project does not find FLTK on its own

parent 6f0b177e
......@@ -67,12 +67,14 @@ IF(OTB_USE_SYSTEM_VXL)
ENDIF(VXL_FOUND)
ENDIF(OTB_USE_SYSTEM_VXL)
#WHERE TO FIND ITK
IF(OTB_USE_EXTERNAL_ITK)
INCLUDE(${OTB_ITK_DIR}/ITKConfig.cmake)
INCLUDE(${ITK_USE_FILE})
ENDIF(OTB_USE_EXTERNAL_ITK)
#WHERE TO FIND EXPAT
IF(OTB_USE_EXTERNAL_EXPAT)
FIND_PACKAGE(EXPAT)
......@@ -82,7 +84,7 @@ IF(OTB_USE_EXTERNAL_EXPAT)
LINK_DIRECTORIES( ${EXPAT_LIBRARY} )
ELSE(EXPAT_FOUND)
MESSAGE(FATAL_ERROR
"Cannot use OTB project without lib EXPAT. Please set EXPAT_DIR or rebuild OTB and set OTB_USE_EXTERNAL_EXPAT OFF to use INTERNAL EXPAT set on OTB/Utilities repository.")
"Cannot use OTB project without EXPAT library. Please set EXPAT_DIR or rebuild OTB and set OTB_USE_EXTERNAL_EXPAT OFF to use INTERNAL EXPAT set on OTB/Utilities repository.")
ENDIF(EXPAT_FOUND)
ENDIF(OTB_USE_EXTERNAL_EXPAT)
......@@ -118,25 +120,31 @@ IF(OTB_USE_EXTERNAL_GDAL)
INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIR})
ENDIF(OTB_USE_EXTERNAL_GDAL)
#WHERE TO FIND FLTK
if(OTB_USE_EXTERNAL_FLTK)
FIND_PACKAGE(FLTK)
IF(NOT FLTK_FOUND)
MESSAGE(FATAL_ERROR
"OTB was built with an external FLTK library, but I could not find it. Please set FLTK_DIR to the path containing FLTKConfig.cmake.")
ENDIF(NOT FLTK_FOUND)
LINK_DIRECTORIES(${FLTK_LIBRARY_DIRS})
else(OTB_USE_EXTERNAL_FLTK)
FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid PATHS
${OTB_BINARY_DIRS}
${OTB_BINARY_DIRS}/Release
${OTB_BINARY_DIRS}/RelWithDebInfo
${OTB_BINARY_DIRS}/Debug
NO_SYSTEM_PATH)
FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid PATHS
${OTB_BINARY_DIRS}
${OTB_BINARY_DIRS}/Release
${OTB_BINARY_DIRS}/RelWithDebInfo
${OTB_BINARY_DIRS}/Debug
NO_SYSTEM_PATH)
endif(OTB_USE_EXTERNAL_FLTK)
# The use curl definition
IF(OTB_USE_CURL)
ADD_DEFINITIONS(-DOTB_USE_CURL)
ADD_DEFINITIONS(-DOTB_USE_CURL)
ENDIF(OTB_USE_CURL)
IF(OTB_CURL_MULTI_AVAILABLE)
ADD_DEFINITIONS(-DOTB_CURL_MULTI_AVAILABLE)
ADD_DEFINITIONS(-DOTB_CURL_MULTI_AVAILABLE)
ENDIF(OTB_CURL_MULTI_AVAILABLE)
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