Skip to content

Commit

Permalink
condition usage of zlib
Browse files Browse the repository at this point in the history
  • Loading branch information
galkahana committed Feb 25, 2023
1 parent f2518c9 commit 859e084
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
7 changes: 6 additions & 1 deletion FreeType/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions LibPng/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion LibTiff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 859e084

Please sign in to comment.