forked from InsightSoftwareConsortium/ITK
/
CMakeLists.txt
22 lines (20 loc) · 866 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
unset(WRAP_ITK_MODULES CACHE)
if(ITK_SOURCE_DIR)
foreach(m ${ITK_CONFIG_MODULES_ENABLED})
if(EXISTS "${${m}_SOURCE_DIR}/wrapping/CMakeLists.txt")
list(APPEND WRAP_ITK_MODULES ${m})
add_subdirectory("${${m}_SOURCE_DIR}/wrapping" ${CMAKE_CURRENT_BINARY_DIR}/${m})
endif()
endforeach()
else() # Building a module externally
if(EXISTS "${${itk-module}_SOURCE_DIR}/wrapping/CMakeLists.txt")
foreach(module ${ITK_MODULE_${itk-module}_DEPENDS})
if(EXISTS ${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/${module}.mdx)
list(APPEND WRAP_ITK_MODULES ${module})
endif()
endforeach()
list(APPEND WRAP_ITK_MODULES ${itk-module})
add_subdirectory("${${itk-module}_SOURCE_DIR}/wrapping" ${CMAKE_CURRENT_BINARY_DIR}/${itk-module})
endif()
endif()
set(WRAP_ITK_MODULES ${WRAP_ITK_MODULES} CACHE INTERNAL "Internal library list.")