Skip to content

Commit

Permalink
COMP: Declare ZLIB_SYMBOL_PREFIX as cache variable
Browse files Browse the repository at this point in the history
itkzlib-ng uses the CMake cache variable ZLIB_SYMBOL_PREFIX. Thus, ITK should
configure this cache variable and not the local variable of the same name.

Any value written to the local CMake variable ZLIB_SYMBOL_PREFIX is overwritten
when itkzlib-ng declares the cache variable of the same name. Thus, before this
change, itkzlib-ng would uses the prefix "" after the first CMake run and
the intended prefix "itkzlib_" only after subsequent CMake runs. With this
change, the intended prefix is used after a single CMake run.
  • Loading branch information
maxaehle committed Jan 5, 2023
1 parent 06a6761 commit f935f4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/ThirdParty/ZLIB/src/CMakeLists.txt
Expand Up @@ -2,7 +2,7 @@ set(INC_INSTALL_DIR "${ITKZLIB_INSTALL_INCLUDE_DIR}/itkzlib-ng")
set(BIN_INSTALL_DIR "${ITKZLIB_INSTALL_RUNTIME_DIR}")
set(LIB_INSTALL_DIR "${ITKZLIB_INSTALL_LIBRARY_DIR}")
set(PKGCONFIG_INSTALL_DIR "${ITKZLIB_INSTALL_ARCHIVE_DIR}")
set(ZLIB_SYMBOL_PREFIX "itkzlib_")
set(ZLIB_SYMBOL_PREFIX "itkzlib_" CACHE INTERNAL "Hardcoded prefix for symbols in zlib")
set(ZLIB_COMPAT ON)
set(ZLIB_DUAL_LINK OFF)
set(ZLIB_ENABLE_TESTS OFF)
Expand Down

0 comments on commit f935f4c

Please sign in to comment.