From 138fcfc99094c626cb60fc49a9eaa762932e76c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Komar=C4=8Devi=C4=87?= Date: Thu, 19 Dec 2024 11:17:29 +0100 Subject: [PATCH] Export more dependencies in CMake config brotli and inih are not included as CMake doesn't ship standard find modules for those (cherry picked from commit f043d0c194fc18e9323900886968751bd5fef942) # Conflicts: # src/CMakeLists.txt --- cmake/exiv2Config.cmake.in | 14 ++++++++++++++ src/CMakeLists.txt | 3 +++ 2 files changed, 17 insertions(+) diff --git a/cmake/exiv2Config.cmake.in b/cmake/exiv2Config.cmake.in index c9e2eba9b5..1089786ff6 100644 --- a/cmake/exiv2Config.cmake.in +++ b/cmake/exiv2Config.cmake.in @@ -7,10 +7,24 @@ if(@EXIV2_ENABLE_PNG@) # if(EXIV2_ENABLE_PNG) find_dependency(ZLIB REQUIRED) endif() +if(@EXIV2_ENABLE_WEBREADY@) # if(EXIV2_ENABLE_WEBREADY) + if(@EXIV2_ENABLE_CURL@) # if(EXIV2_ENABLE_CURL) + find_dependency(CURL REQUIRED) + endif() +endif() + if(@EXIV2_ENABLE_XMP@) # if(EXIV2_ENABLE_XMP) find_dependency(EXPAT REQUIRED) endif() +if(@EXIV2_ENABLE_NLS@) # if(EXIV2_ENABLE_NLS) + find_dependency(Intl REQUIRED) +endif() + +if(@EXV_HAVE_LIBICONV@) # if(EXV_HAVE_LIBICONV) + find_dependency(Iconv REQUIRED) +endif() + include("${CMAKE_CURRENT_LIST_DIR}/exiv2Export.cmake") check_required_components(exiv2) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bee7d66beb..5fe4da6f50 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -255,6 +255,9 @@ endif() if( Iconv_FOUND AND Iconv_LIBRARIES ) target_link_libraries( exiv2lib PRIVATE Iconv::Iconv ) list(APPEND libs_private_list "iconv") + set(EXV_HAVE_LIBICONV TRUE PARENT_SCOPE) +else() + set(EXV_HAVE_LIBICONV FALSE PARENT_SCOPE) endif() if( EXIV2_ENABLE_INIH )