-
Notifications
You must be signed in to change notification settings - Fork 2
/
ITKSoftwareGuide.cmake
38 lines (30 loc) · 1.31 KB
/
ITKSoftwareGuide.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
#-----------------------------------------------------------------------------
# Update CMake module path
#------------------------------------------------------------------------------
set(CMAKE_MODULE_PATH
${${PROJECT_NAME}_SOURCE_DIR}/CMake
${${PROJECT_NAME}_BINARY_DIR}/CMake
${CMAKE_MODULE_PATH}
)
#-----------------------------------------------------------------------------
find_package(ITK REQUIRED)
if(Slicer_BUILD_${PROJECT_NAME})
set(ITK_NO_IO_FACTORY_REGISTER_MANAGER 1) # Incorporate with Slicer nicely
endif()
include(${ITK_USE_FILE})
if( NOT IS_DIRECTORY "${ITK_SOURCE_DIR}" )
message(FATAL_ERROR "ITK source directory is not set :${ITK_SOURCE_DIR}:")
endif()
if( NOT IS_DIRECTORY "${ITK_BINARY_DIR}" )
message(FATAL_ERROR "ITK build directory is not set :${ITK_BINARY_DIR}:")
endif()
#-----------------------------------------------------------------------------
enable_testing()
include(CTest)
#-----------------------------------------------------------------------
# Setup locations to find externally maintained test data.
#-----------------------------------------------------------------------
include(${PROJECT_NAME}ExternalData)
add_subdirectory(SoftwareGuide)
ExternalData_Add_Target( ${PROJECT_NAME}FetchData ) # Name of data management target