Commit 7762e90b authored by Emmanuel Christophe's avatar Emmanuel Christophe

COMP: cleaning FLTK configuration

parent 6d4be143
......@@ -286,15 +286,19 @@ 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)
# OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." ON)
SET(OTB_USE_EXTERNAL_FLTK ON)
ELSE(FLTK_FOUND)
OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." OFF)
#OPTION(OTB_USE_EXTERNAL_FLTK "Use an outside build of FLTK." OFF)
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)
......@@ -304,32 +308,38 @@ IF(OTB_USE_VISU_GUI)
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 (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})
# LINK_DIRECTORIES(${FLTK_LIBRARY_DIRS})
ELSE(FLTK_FOUND)
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")
# 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})
# SET(OTB_VISU_GUI_LIBRARIES "${FLTK_LIBRARIES};${OPENGL_LIBRARIES} ")
# SET(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND})
ENDIF(OTB_USE_EXTERNAL_FLTK)
# INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIRS})
SET(OTB_VISU_GUI_LIBRARIES "${FLTK_LIBRARIES};${OPENGL_LIBRARIES} ")
SET(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND})
ENDIF(OTB_USE_VISU_GUI)
#-------------------------------
......
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