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 mergify[bot] committed Oct 9, 2024
1 parent 193b643 commit bd4f0e4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,14 @@ set_target_properties( exiv2lib_int PROPERTIES
)

# NOTE: Cannot use target_link_libraries on OBJECT libraries with old versions of CMake
<<<<<<< HEAD
target_include_directories(exiv2lib_int PRIVATE ${ZLIB_INCLUDE_DIR})
target_include_directories(exiv2lib SYSTEM PRIVATE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>
)
=======
target_include_directories(exiv2lib SYSTEM PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>)
>>>>>>> 81bc63d9c (CMake: Resolve Missing ZLIB Warning When PNG is Disabled)

if (EXIV2_ENABLE_XMP OR EXIV2_ENABLE_EXTERNAL_XMP)
target_include_directories(exiv2lib PRIVATE ${EXPAT_INCLUDE_DIR})
Expand Down Expand Up @@ -229,9 +233,16 @@ else()
target_link_libraries( exiv2lib PRIVATE psapi ws2_32 shell32 )
endif()

<<<<<<< HEAD
if( EXIV2_ENABLE_PNG )
target_link_libraries( exiv2lib PRIVATE ZLIB::ZLIB)
list(APPEND requires_private_list "zlib")
=======
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")
>>>>>>> 81bc63d9c (CMake: Resolve Missing ZLIB Warning When PNG is Disabled)
endif()

if( EXIV2_ENABLE_BMFF AND BROTLI_FOUND )
Expand Down

0 comments on commit bd4f0e4

Please sign in to comment.