mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 18:28:59 +08:00
d6285bc24b
* [expat] Update the version to 2.2.9(support uwp) * [readosm] Fix expat.lib cannot be found * Remove expat:arm-uwp and expat:x64-uwp from fail list in ci.baseline.txt * [apr-util,io2d,skia] Fix expat cannot be found and also update expat * [many ports] Add supports and fix the regressions * Fix new regressions * Fix typo * [io2d] Update expat patch * [io2d,libkml,skia] Fix expat cannot find and also fix typo * [expat] Remove usage * [libkml,vtk] Update expat patch and fix static build * [wxwidgets] Fix static build caused by expat cannot found * Update as review suggestion * Add Port-Version * Remove evpp:x64-osx=fail from ci.baseline.txt * [wxwidgest] Remove unnecessary spaces * [itk] Fix expat cannot be found * fix cmake test port * [wxwidgets] Update Port-Version Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
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
|