From 5498e63a4865b242007d0050eb36b975a4b5cfb9 Mon Sep 17 00:00:00 2001 From: Holden Date: Wed, 9 Oct 2024 05:28:18 -0400 Subject: [PATCH] CMake: Resolve Missing ZLIB Warning When PNG is Disabled (cherry picked from commit 81bc63d9c4aa953b3e5d86b98c21263646af4629) # Conflicts: # src/CMakeLists.txt --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 20ac1296bf..bee7d66beb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 $ ) @@ -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()