mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-12 19:39:03 +08:00
46 lines
1.4 KiB
Diff
46 lines
1.4 KiB
Diff
|
diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake
|
||
|
index 9caffcf..deb01a0 100644
|
||
|
--- a/cmake/findDependencies.cmake
|
||
|
+++ b/cmake/findDependencies.cmake
|
||
|
@@ -33,7 +33,7 @@ if (EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP)
|
||
|
message(FATAL_ERROR "EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP are mutually exclusive. You can only choose one of them")
|
||
|
else()
|
||
|
if (EXIV2_ENABLE_XMP)
|
||
|
- find_package(EXPAT REQUIRED)
|
||
|
+ find_package(expat CONFIG REQUIRED)
|
||
|
elseif (EXIV2_ENABLE_EXTERNAL_XMP)
|
||
|
find_package(XmpSdk REQUIRED)
|
||
|
endif ()
|
||
|
diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt
|
||
|
index ae011dc..7390d26 100644
|
||
|
--- a/xmpsdk/CMakeLists.txt
|
||
|
+++ b/xmpsdk/CMakeLists.txt
|
||
|
@@ -26,16 +26,21 @@ add_library(exiv2-xmp STATIC
|
||
|
include/XMP_Version.h
|
||
|
)
|
||
|
|
||
|
-target_link_libraries(exiv2-xmp
|
||
|
- PRIVATE
|
||
|
- ${EXPAT_LIBRARY}
|
||
|
-)
|
||
|
+if(WIN32 AND NOT MINGW)
|
||
|
+ target_link_libraries(exiv2-xmp
|
||
|
+ PRIVATE
|
||
|
+ expat::libexpat
|
||
|
+ )
|
||
|
+else()
|
||
|
+ target_link_libraries(exiv2-xmp
|
||
|
+ PRIVATE
|
||
|
+ expat::expat
|
||
|
+ )
|
||
|
+endif()
|
||
|
|
||
|
target_include_directories(exiv2-xmp
|
||
|
PUBLIC
|
||
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>
|
||
|
- PRIVATE
|
||
|
- ${EXPAT_INCLUDE_DIR}
|
||
|
)
|
||
|
|
||
|
# Prevent a denial-service-attack related to XML entity expansion
|