# The project name # GIFT = Generalised Image Fusion Toolkit ######################################### PROJECT( GIFT ) SET (LIBRARY_OUTPUT_PATH ${GIFT_BINARY_DIR}/bin CACHE PATH "Single output directory for building all libraries." FORCE) SET (EXECUTABLE_OUTPUT_PATH ${GIFT_BINARY_DIR}/bin CACHE PATH "Single output directory for building all executables." FORCE) # Add the testing directories OPTION(GIFT_BUILD_TESTING "Test the project" ON) IF(GIFT_BUILD_TESTING) ENABLE_TESTING() ENDIF(GIFT_BUILD_TESTING) SET(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH}) # # FIND ITK # FIND_PACKAGE(ITK) IF (USE_ITK_FILE) INCLUDE (${USE_ITK_FILE}) ELSE (USE_ITK_FILE) MESSAGE( FATAL_ERROR "This application requires ITK. One of these components is missing. Please verify configuration") ENDIF (USE_ITK_FILE) # # USE VXL # SET(VXL_NUMERICS_LIBRARIES itkvnl itkvnl_algo itknetlib) # The GIFT Library SUBDIRS(Source) # Add the testing directories IF(GIFT_BUILD_TESTING) SUBDIRS(Testing) ENDIF(GIFT_BUILD_TESTING) # Add the examples directories OPTION(GIFT_BUILD_EXAMPLES "Project examples" ON) IF(GIFT_BUILD_EXAMPLES) SUBDIRS(Examples) ENDIF(GIFT_BUILD_EXAMPLES) #----------------------------------------------------------------------------- # Configure the default GIFT_DATA_ROOT for the location of GIFT Data. FIND_PATH(GIFT_DATA_ROOT giftDataReadMe.txt ${GIFT_SOURCE_DIR}/Testing/Data $ENV{GIFT_DATA_ROOT}) MARK_AS_ADVANCED(GIFT_DATA_ROOT) #----------------------------------------------------------------------------- # The entire GIFT tree should use the same include path. # Create the list of include directories needed for GIFT header files. INCLUDE(${GIFT_SOURCE_DIR}/giftIncludeDirectories.cmake) # This should be the only INCLUDE_DIRECTORIES command in the entire # tree, except for the Utilities directory. We need to # do this in one place to make sure the order is correct. INCLUDE_DIRECTORIES( ${GIFT_INCLUDE_DIRS_BUILD_TREE} ${GIFT_INCLUDE_DIRS_BUILD_TREE_CXX} ${GIFT_INCLUDE_DIRS_SYSTEM} ) #----------------------------------------------------------------------------- # Add compiler flags GIFT needs to work on this platform. This must be # done AFTER the call to CMAKE_EXPORT_BUILD_SETTINGS. SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GIFT_REQUIRED_C_FLAGS}") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GIFT_REQUIRED_CXX_FLAGS}") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GIFT_REQUIRED_LINK_FLAGS}") SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GIFT_REQUIRED_LINK_FLAGS}") SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${GIFT_REQUIRED_LINK_FLAGS}") #OPTION(BUILD_DOCUMENTATION "Build GIFT Documentation" OFF) #IF(BUILD_DOCUMENTATION) # FIND_PACKAGE(VTK) # IF (USE_VTK_FILE) # INCLUDE (${USE_VTK_FILE}) # ELSE (USE_VTK_FILE) # MESSAGE( FATAL_ERROR "This application requires VTK. One of these components is missing. Please verify configuration") # ENDIF (USE_VTK_FILE) # SUBDIRS(Utilities/Doxygen) #ENDIF(BUILD_DOCUMENTATION)