Skip to content

Commit

Permalink
Export more dependencies in CMake config
Browse files Browse the repository at this point in the history
brotli and inih are not included as CMake doesn't ship standard find modules for those
  • Loading branch information
kmilos committed Dec 20, 2024
1 parent 09b448d commit f043d0c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmake/exiv2Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,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)
Expand Down

0 comments on commit f043d0c

Please sign in to comment.