diff --git a/cmake/exiv2Config.cmake.in b/cmake/exiv2Config.cmake.in index e5809ac3eb..63c9362ff7 100644 --- a/cmake/exiv2Config.cmake.in +++ b/cmake/exiv2Config.cmake.in @@ -7,6 +7,10 @@ if(@EXIV2_ENABLE_PNG@) # if(EXIV2_ENABLE_PNG) find_dependency(ZLIB REQUIRED) endif() +if(@EXIV2_ENABLE_XMP@) # if(EXIV2_ENABLE_XMP) + find_dependency(EXPAT REQUIRED) +endif() + include("${CMAKE_CURRENT_LIST_DIR}/exiv2Export.cmake") check_required_components(exiv2) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b3c55fc164..4952c0dbfa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -184,7 +184,7 @@ target_include_directories(exiv2lib SYSTEM PRIVATE if (EXIV2_ENABLE_XMP OR EXIV2_ENABLE_EXTERNAL_XMP) target_include_directories(exiv2lib PRIVATE ${EXPAT_INCLUDE_DIR}) - target_link_libraries(exiv2lib PRIVATE $) + target_link_libraries(exiv2lib PRIVATE EXPAT::EXPAT) list(APPEND requires_private_list "expat") endif()