Skip to content

Commit

Permalink
CMake: Resolve Missing ZLIB Warning When PNG is Disabled
Browse files Browse the repository at this point in the history
(cherry picked from commit 81bc63d)

# Conflicts:
#	src/CMakeLists.txt
  • Loading branch information
HTRamsey authored and kmilos committed Oct 9, 2024
1 parent 193b643 commit 50970ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ set_target_properties( exiv2lib_int PROPERTIES
)

# NOTE: Cannot use target_link_libraries on OBJECT libraries with old versions of CMake
target_include_directories(exiv2lib_int PRIVATE ${ZLIB_INCLUDE_DIR})
target_include_directories(exiv2lib SYSTEM PRIVATE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>
)
Expand Down Expand Up @@ -231,6 +230,7 @@ endif()

if( EXIV2_ENABLE_PNG )
target_link_libraries( exiv2lib PRIVATE ZLIB::ZLIB)
target_include_directories(exiv2lib_int PRIVATE ${ZLIB_INCLUDE_DIR})
list(APPEND requires_private_list "zlib")
endif()

Expand Down

0 comments on commit 50970ae

Please sign in to comment.