Skip to content

Commit 64c42b5

Browse files
authored
Merge pull request #5962 from blowekamp/cache_itk_cmake_dir
ENH: Make ITK_CMAKE_DIR an internal cache variable
2 parents 61e193c + 79e1fa7 commit 64c42b5

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,15 @@ project(
6767
C
6868
)
6969

70-
set(ITK_CMAKE_DIR "${ITK_SOURCE_DIR}/CMake")
70+
# Required as a cache variable for FetchContent parent projects can
71+
# resolve ITK's CMake macros and config paths.
72+
set(
73+
ITK_CMAKE_DIR
74+
"${ITK_SOURCE_DIR}/CMake"
75+
CACHE INTERNAL
76+
"Directory containing CMake files for ITK configuration and module macros"
77+
FORCE
78+
)
7179

7280
if(APPLE)
7381
include(itkApple)

0 commit comments

Comments
 (0)