Skip to content

Commit 8714311

Browse files
committed
COMP: Build ITK with shared libs to avoid has no symbols warnings
To avoid the warnings: /Applications/Xcode_9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: lib/libitkgdcmCommon-5.0.a(gdcmDataEvent.cxx.o) has no symbols Suggested arguments from: https://stackoverflow.com/questions/4929255/building-static-libraries-on-mac-using-cmake-and-gcc
1 parent 762fee8 commit 8714311

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

Superbuild/External-ITK.cmake

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@ if(NOT ITK_TAG)
66
set(ITK_TAG "48ff8821533ef4a4fac7b81e2800e796132a1216")
77
endif()
88

9-
set( _vtk_args )
10-
if( VTK_DIR OR ITKExamples_USE_VTK )
9+
set(_vtk_args)
10+
if(VTK_DIR OR ITKExamples_USE_VTK)
1111
set( _vtk_args "-DVTK_DIR:PATH=${VTK_DIR}"
1212
-DModule_ITKVtkGlue:BOOL=ON
1313
-DModule_ITKLevelSetsv4Visualization:BOOL=ON
1414
)
1515
else()
16-
set( _vtk_args
16+
set(_vtk_args
1717
-DModule_ITKVtkGlue:BOOL=OFF
1818
-DModule_ITKLevelSetsv4Visualization:BOOL=OFF
1919
)
2020
endif()
2121

22-
set( _opencv_args )
23-
if( OpenCV_DIR OR ITKExamples_USE_OpenCV )
22+
set(_opencv_args )
23+
if(OpenCV_DIR OR ITKExamples_USE_OpenCV)
2424
set( _opencv_args "-DOpenCV_DIR:PATH=${OpenCV_DIR}"
2525
-DModule_ITKVideoBridgeOpenCV:BOOL=ON
2626
)
2727
else()
28-
set( _opencv_args
28+
set(_opencv_args
2929
-DModule_ITKVideoBridgeOpenCV:BOOL=OFF
3030
)
3131
endif()
@@ -41,6 +41,13 @@ if(ITKExamples_USE_WRAP_PYTHON)
4141
)
4242
endif()
4343

44+
set(_apple_args)
45+
if(APPLE)
46+
set(_apple_args
47+
"-DBUILD_SHARED_LIBS:BOOL=ON"
48+
)
49+
endif()
50+
4451
ExternalProject_Add(ITK
4552
GIT_REPOSITORY "${git_protocol}://github.com/InsightSoftwareConsortium/ITK.git"
4653
GIT_TAG "${ITK_TAG}"
@@ -63,6 +70,7 @@ ExternalProject_Add(ITK
6370
${_vtk_args}
6471
${_opencv_args}
6572
${_wrap_python_args}
73+
${_apple_args}
6674
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "ITK install skipped"
6775
DEPENDS ${ITK_DEPENDENCIES} ${_python_depends} zlib
6876
LOG_BUILD 0

0 commit comments

Comments
 (0)