diff --git a/FreeType/CMakeLists.txt b/FreeType/CMakeLists.txt index 7cf2ce9e..8d06353f 100644 --- a/FreeType/CMakeLists.txt +++ b/FreeType/CMakeLists.txt @@ -70,7 +70,12 @@ endif () # set to use FT_CONFIG_OPTION_SYSTEM_ZLIB...or in other words...another zlib target_compile_definitions(FreeType PUBLIC FT2_BUILD_LIBRARY=1 FT_CONFIG_OPTION_SYSTEM_ZLIB=1) -target_link_libraries(FreeType PDFHummus::Zlib) +if(USING_UNBUNDLED_ZLIB) + target_link_libraries(FreeType ZLIB::ZLIB) +else(USING_UNBUNDLED_ZLIB) + target_link_libraries(FreeType PDFHummus::Zlib) +endif(USING_UNBUNDLED_ZLIB) + target_include_directories(FreeType PRIVATE diff --git a/LibPng/CMakeLists.txt b/LibPng/CMakeLists.txt index 916d4476..1129c0bb 100644 --- a/LibPng/CMakeLists.txt +++ b/LibPng/CMakeLists.txt @@ -45,8 +45,11 @@ if(WIN32 AND BUILD_SHARED_LIBS) target_compile_definitions(LibPng PUBLIC PNG_USE_DLL) endif() -target_link_libraries(LibPng PDFHummus::Zlib) - +if(USING_UNBUNDLED_ZLIB) + target_link_libraries(LibPng ZLIB::ZLIB) +else(USING_UNBUNDLED_ZLIB) + target_link_libraries(LibPng PDFHummus::Zlib) +endif(USING_UNBUNDLED_ZLIB) install(TARGETS LibPng EXPORT PDFHummusTargets diff --git a/LibTiff/CMakeLists.txt b/LibTiff/CMakeLists.txt index 02605c4d..f2825f9b 100644 --- a/LibTiff/CMakeLists.txt +++ b/LibTiff/CMakeLists.txt @@ -85,7 +85,12 @@ target_compile_definitions(LibTiff PUBLIC FILLODER_LSB2MSB=1 ) -target_link_libraries(LibTiff PDFHummus::Zlib) +if(USING_UNBUNDLED_ZLIB) + target_link_libraries(LibTiff ZLIB::ZLIB) +else(USING_UNBUNDLED_ZLIB) + target_link_libraries(LibTiff PDFHummus::Zlib) +endif(USING_UNBUNDLED_ZLIB) + if(WIN32 AND BUILD_SHARED_LIBS) set_target_properties(LibTiff PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)