File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,14 @@ if(APPLE)
4747 "-DBUILD_SHARED_LIBS:BOOL=ON"
4848 )
4949endif ()
50+ set (_windows_args)
51+ set (_zlib_deps zlib)
52+ if (WIN32 )
53+ set (_windows_args
54+ "-DITK_USE_SYSTEM_ZLIB:BOOL=OFF"
55+ )
56+ set (_zlib_deps )
57+ endif ()
5058
5159ExternalProject_Add(ITK
5260 GIT_REPOSITORY "${git_protocol} ://github.com/InsightSoftwareConsortium/ITK.git"
@@ -71,8 +79,9 @@ ExternalProject_Add(ITK
7179 ${_opencv_args}
7280 ${_wrap_python_args}
7381 ${_apple_args}
82+ ${_windows_args}
7483 INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "ITK install skipped"
75- DEPENDS ${ITK_DEPENDENCIES} ${_python_depends} zlib
84+ DEPENDS ${ITK_DEPENDENCIES} ${_python_depends} ${_zlib_deps}
7685 LOG_BUILD 0
7786)
7887
Original file line number Diff line number Diff line change @@ -31,8 +31,10 @@ endif()
3131set (ITKExamples_DEPENDENCIES )
3232set (ITK_DEPENDENCIES )
3333
34- # Used by ITK, VTK, and Python -- always build it.
35- include (${CMAKE_SOURCE_DIR} /External-zlib.cmake)
34+ # Used by ITK, VTK, -- always build it.
35+ if (NOT WIN32 OR ITKExamples_USE_VTK AND NOT VTK_DIR)
36+ include (${CMAKE_SOURCE_DIR} /External-zlib.cmake)
37+ endif ()
3638
3739option (ITKExamples_USE_OpenCV "Add OpenCV to the superbuild" OFF )
3840if (NOT OpenCV_DIR AND ITKExamples_USE_OpenCV)
You can’t perform that action at this time.
0 commit comments