-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[expat] Update the version to 2.2.9 (add support for uwp) (#9146)
* [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>
- Loading branch information
1 parent
5dd2b67
commit d6285bc
Showing
43 changed files
with
522 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
Source: apr-util | ||
Version: 1.6.1-1 | ||
Version: 1.6.1 | ||
Port-Version: 2 | ||
Homepage: https://apr.apache.org/ | ||
Description: Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation | ||
Build-Depends: expat, apr, openssl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,116 +1,124 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 9ae90b19..b0e86e2c 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -29,8 +29,9 @@ OPTION(APR_HAS_LDAP "LDAP support" ON) | ||
OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON) | ||
OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF) | ||
OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF) | ||
-SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR include files") | ||
-SET(APR_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib" CACHE STRING "APR library to link with") | ||
+ | ||
+find_path(APR_INCLUDE_DIR apr.h) | ||
+find_library(APR_LIBRARIES NAMES libapr-1 apr-1) | ||
|
||
IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") | ||
MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") | ||
@@ -65,8 +66,8 @@ IF(NOT EXPAT_FOUND) | ||
MESSAGE(FATAL_ERROR "Expat is required, and it wasn't found!") | ||
ENDIF() | ||
|
||
-SET(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS}) | ||
-SET(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES}) | ||
+find_path(XMLLIB_INCLUDE_DIR expat.h) | ||
+find_library(XMLLIB_LIBRARIES NAMES expat) | ||
|
||
SET(LDAP_LIBRARIES) | ||
IF(APR_HAS_LDAP) | ||
@@ -229,17 +230,21 @@ SET(dbd_drivers) | ||
# Note: The WINNT definition on some targets is used only by libaprutil.rc. | ||
|
||
# libaprutil-1 is shared, aprutil-1 is static | ||
+if(BUILD_SHARED_LIBS) | ||
ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc) | ||
SET(install_targets ${install_targets} libaprutil-1) | ||
SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb) | ||
TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) | ||
-SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;XML_STATIC;WINNT") | ||
+SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_IMPORT;XML_STATIC;WINNT") | ||
|
||
+else(BUILD_SHARED_LIBS) | ||
ADD_LIBRARY(aprutil-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) | ||
SET(install_targets ${install_targets} aprutil-1) | ||
TARGET_LINK_LIBRARIES(aprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) | ||
SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC") | ||
- | ||
+endif(BUILD_SHARED_LIBS) | ||
+ | ||
+if(BUILD_SHARED_LIBS) | ||
IF(APU_HAVE_CRYPTO) | ||
IF(NOT OPENSSL_FOUND) | ||
MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build") | ||
@@ -249,7 +254,7 @@ IF(APU_HAVE_CRYPTO) | ||
SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_crypto_openssl-1.pdb) | ||
SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OPENSSL_INCLUDE_DIR}") | ||
SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") | ||
- SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_crypto_openssl") | ||
+ SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_crypto_openssl") | ||
TARGET_LINK_LIBRARIES(apr_crypto_openssl-1 libaprutil-1 ${APR_LIBRARIES} ${OPENSSL_LIBRARIES}) | ||
ENDIF() | ||
|
||
@@ -260,8 +265,8 @@ IF(APU_HAVE_ODBC) | ||
SET(dbd_drivers ${dbd_drivers} odbc) | ||
TARGET_LINK_LIBRARIES(apr_dbd_odbc-1 libaprutil-1 ${APR_LIBRARIES} odbc32 odbccp32) | ||
SET_PROPERTY(TARGET apr_dbd_odbc-1 APPEND PROPERTY LINK_FLAGS /export:apr_dbd_odbc_driver) | ||
- SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;APU_DSO_MODULE_BUILD;WINNT") | ||
- SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_dbd_odbc") | ||
+ SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_IMPORT;APR_DECLARE_IMPORT;APU_DSO_MODULE_BUILD;WINNT") | ||
+ SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_dbd_odbc") | ||
ENDIF() | ||
|
||
IF(APR_HAS_LDAP) | ||
@@ -271,11 +276,12 @@ IF(APR_HAS_LDAP) | ||
SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb) | ||
TARGET_LINK_LIBRARIES(apr_ldap-1 libaprutil-1 ${APR_LIBRARIES} ${LDAP_LIBRARIES}) | ||
SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") | ||
- SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_ldap") | ||
+ SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_ldap") | ||
SET(apr_ldap_libraries apr_ldap-1) | ||
ELSE() | ||
SET(apr_ldap_libraries) | ||
ENDIF() | ||
+endif(BUILD_SHARED_LIBS) | ||
|
||
IF(APR_BUILD_TESTAPR) | ||
ENABLE_TESTING() | ||
@@ -289,7 +295,7 @@ IF(APR_BUILD_TESTAPR) | ||
${PROJECT_SOURCE_DIR}/test/data/billion-laughs.xml | ||
${PROJECT_BINARY_DIR}/data/billion-laughs.xml) | ||
|
||
- IF(TEST_STATIC_LIBS) | ||
+ IF(NOT BUILD_SHARED_LIBS) | ||
SET(whichapr aprutil-1) | ||
SET(apiflag "-DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC") | ||
ELSE() | ||
@@ -325,13 +331,15 @@ INSTALL(TARGETS ${install_targets} | ||
ARCHIVE DESTINATION lib | ||
) | ||
|
||
-IF(INSTALL_PDB) | ||
- INSTALL(FILES ${install_bin_pdb} | ||
- DESTINATION bin | ||
- CONFIGURATIONS RelWithDebInfo Debug) | ||
-ENDIF() | ||
+#IF(INSTALL_PDB) | ||
+# INSTALL(FILES ${install_bin_pdb} | ||
+# DESTINATION bin | ||
+# CONFIGURATIONS RelWithDebInfo Debug) | ||
+#ENDIF() | ||
|
||
-INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) | ||
+if(NOT DISABLE_INSTALL_HEADERS) | ||
+ INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) | ||
+endif() | ||
|
||
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) | ||
MESSAGE(STATUS "") | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 9ae90b1..71a50b0 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -21,16 +21,14 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) | ||
|
||
FIND_PACKAGE(OpenSSL) | ||
|
||
-FIND_PACKAGE(expat) | ||
- | ||
OPTION(APU_HAVE_CRYPTO "Crypto support" OFF) | ||
OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" ON) | ||
OPTION(APR_HAS_LDAP "LDAP support" ON) | ||
OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON) | ||
OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF) | ||
OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF) | ||
-SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR include files") | ||
-SET(APR_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib" CACHE STRING "APR library to link with") | ||
+find_path(APR_INCLUDE_DIR apr.h) | ||
+find_library(APR_LIBRARIES NAMES libapr-1 apr-1) | ||
|
||
IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") | ||
MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") | ||
@@ -61,13 +59,13 @@ IF(APR_HAS_LDAP) | ||
SET(apr_has_ldap_10 1) | ||
ENDIF() | ||
|
||
-IF(NOT EXPAT_FOUND) | ||
+find_path(XMLLIB_INCLUDE_DIR expat.h) | ||
+find_library(XMLLIB_LIBRARIES NAMES libexpat libexpatMD) | ||
+ | ||
+IF(NOT XMLLIB_LIBRARIES) | ||
MESSAGE(FATAL_ERROR "Expat is required, and it wasn't found!") | ||
ENDIF() | ||
|
||
-SET(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS}) | ||
-SET(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES}) | ||
- | ||
SET(LDAP_LIBRARIES) | ||
IF(APR_HAS_LDAP) | ||
SET(LDAP_LIBRARIES wldap32) | ||
@@ -229,17 +227,21 @@ SET(dbd_drivers) | ||
# Note: The WINNT definition on some targets is used only by libaprutil.rc. | ||
|
||
# libaprutil-1 is shared, aprutil-1 is static | ||
+if(BUILD_SHARED_LIBS) | ||
ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc) | ||
SET(install_targets ${install_targets} libaprutil-1) | ||
SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb) | ||
TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) | ||
-SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;XML_STATIC;WINNT") | ||
+SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_IMPORT;XML_STATIC;WINNT") | ||
|
||
+else(BUILD_SHARED_LIBS) | ||
ADD_LIBRARY(aprutil-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) | ||
SET(install_targets ${install_targets} aprutil-1) | ||
TARGET_LINK_LIBRARIES(aprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) | ||
SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC") | ||
+endif(BUILD_SHARED_LIBS) | ||
|
||
+if(BUILD_SHARED_LIBS) | ||
IF(APU_HAVE_CRYPTO) | ||
IF(NOT OPENSSL_FOUND) | ||
MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build") | ||
@@ -249,7 +251,7 @@ IF(APU_HAVE_CRYPTO) | ||
SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_crypto_openssl-1.pdb) | ||
SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OPENSSL_INCLUDE_DIR}") | ||
SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") | ||
- SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_crypto_openssl") | ||
+ SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_crypto_openssl") | ||
TARGET_LINK_LIBRARIES(apr_crypto_openssl-1 libaprutil-1 ${APR_LIBRARIES} ${OPENSSL_LIBRARIES}) | ||
ENDIF() | ||
|
||
@@ -260,8 +262,8 @@ IF(APU_HAVE_ODBC) | ||
SET(dbd_drivers ${dbd_drivers} odbc) | ||
TARGET_LINK_LIBRARIES(apr_dbd_odbc-1 libaprutil-1 ${APR_LIBRARIES} odbc32 odbccp32) | ||
SET_PROPERTY(TARGET apr_dbd_odbc-1 APPEND PROPERTY LINK_FLAGS /export:apr_dbd_odbc_driver) | ||
- SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;APU_DSO_MODULE_BUILD;WINNT") | ||
- SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_dbd_odbc") | ||
+ SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_IMPORT;APR_DECLARE_IMPORT;APU_DSO_MODULE_BUILD;WINNT") | ||
+ SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_dbd_odbc") | ||
ENDIF() | ||
|
||
IF(APR_HAS_LDAP) | ||
@@ -271,11 +273,12 @@ IF(APR_HAS_LDAP) | ||
SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb) | ||
TARGET_LINK_LIBRARIES(apr_ldap-1 libaprutil-1 ${APR_LIBRARIES} ${LDAP_LIBRARIES}) | ||
SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") | ||
- SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_ldap") | ||
+ SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_ldap") | ||
SET(apr_ldap_libraries apr_ldap-1) | ||
ELSE() | ||
SET(apr_ldap_libraries) | ||
ENDIF() | ||
+endif(BUILD_SHARED_LIBS) | ||
|
||
IF(APR_BUILD_TESTAPR) | ||
ENABLE_TESTING() | ||
@@ -289,7 +292,7 @@ IF(APR_BUILD_TESTAPR) | ||
${PROJECT_SOURCE_DIR}/test/data/billion-laughs.xml | ||
${PROJECT_BINARY_DIR}/data/billion-laughs.xml) | ||
|
||
- IF(TEST_STATIC_LIBS) | ||
+ IF(NOT BUILD_SHARED_LIBS) | ||
SET(whichapr aprutil-1) | ||
SET(apiflag "-DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC") | ||
ELSE() | ||
@@ -325,13 +328,9 @@ INSTALL(TARGETS ${install_targets} | ||
ARCHIVE DESTINATION lib | ||
) | ||
|
||
-IF(INSTALL_PDB) | ||
- INSTALL(FILES ${install_bin_pdb} | ||
- DESTINATION bin | ||
- CONFIGURATIONS RelWithDebInfo Debug) | ||
-ENDIF() | ||
- | ||
-INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) | ||
+if(NOT DISABLE_INSTALL_HEADERS) | ||
+ INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) | ||
+endif() | ||
|
||
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) | ||
MESSAGE(STATUS "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
Source: exiv2 | ||
Version: 0.27.3 | ||
Build-Depends: zlib, expat, libiconv, gettext | ||
Port-Version: 1 | ||
Build-Depends: zlib, libiconv, gettext | ||
Description: Image metadata library and tools | ||
Homepage: https://www.exiv2.org | ||
Supports: !uwp | ||
|
||
Feature: unicode | ||
Description: Compile with unicode support on windows | ||
|
||
Feature: xmp | ||
Description: Build with XMP metadata support | ||
Build-Depends: expat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
Source: expat | ||
Version: 2.2.7 | ||
Version: 2.2.9 | ||
Homepage: https://github.com/libexpat/libexpat | ||
Description: XML parser library written in C | ||
Supports: !uwp | ||
Description: XML parser library written in C |
Oops, something went wrong.