Skip to content

Commit 1389c6a

Browse files
committed
COMP: Force static build of expat to match previous build behavior
Allowing dll to be built results in successful build of ``` bin/ITKEXPAT-6.0.dll ``` but the linkage fails by attempting to link the static library name ``` LINK : fatal error LNK1104: cannot open file 'lib\ITKEXPAT-6.0.lib' ``` Expat was never previously built with dll support, so disabling to shared expat builds.
1 parent fbee641 commit 1389c6a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Modules/ThirdParty/Expat/src/expat/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,12 @@ else()
9696
endif()
9797
#]]
9898
# ITK --start
99-
set(_EXPAT_SHARED_LIBS_DEFAULT ${ITK_BUILD_SHARED_LIBS})
100-
set(EXPAT_SHARED_LIBS ${_EXPAT_SHARED_LIBS_DEFAULT} CACHE BOOL "build a shared expat library" FORCE )
99+
# To match previous behavior prior to synchronizing with expat 2.7.2,
100+
# only static builds of expat internal to ITK are supported.
101+
set(_EXPAT_SHARED_LIBS_DEFAULT OFF)
102+
set(EXPAT_SHARED_LIBS OFF CACHE BOOL "build a shared expat library" FORCE )
103+
# set(_EXPAT_SHARED_LIBS_DEFAULT ${ITK_BUILD_SHARED_LIBS})
104+
# set(EXPAT_SHARED_LIBS ${_EXPAT_SHARED_LIBS_DEFAULT} CACHE BOOL "build a shared expat library" FORCE )
101105
# ITK --end
102106
if(NOT CMAKE_BUILD_TYPE)
103107
set(CMAKE_BUILD_TYPE NoConfig) # so that accessing EXPAT_*_POSTFIX will be waterproof

0 commit comments

Comments
 (0)