mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 06:53:58 +08:00
[exiv2] Update, cleanup (#29732)
This commit is contained in:
parent
baf8db0dfe
commit
bf4822b562
@ -2,63 +2,15 @@ diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake
|
||||
index ec3a43f..d8637cc 100644
|
||||
--- a/cmake/findDependencies.cmake
|
||||
+++ b/cmake/findDependencies.cmake
|
||||
@@ -42,7 +42,8 @@ if (EXIV2_ENABLE_XMP AND EXIV2_ENABLE_EXTERNAL_XMP)
|
||||
@@ -42,7 +42,10 @@ 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)
|
||||
+ set(EXPAT_FOUND 1)
|
||||
+ find_package(EXPAT NAMES expat CONFIG REQUIRED)
|
||||
+ set(EXPAT_INCLUDE_DIR "")
|
||||
+ set(EXPAT_LIBRARY expat::expat)
|
||||
+ set(EXPAT_LIBRARIES expat::expat)
|
||||
elseif (EXIV2_ENABLE_EXTERNAL_XMP)
|
||||
find_package(XmpSdk REQUIRED)
|
||||
endif ()
|
||||
diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt
|
||||
index de8aa1d..524724c 100644
|
||||
--- a/samples/CMakeLists.txt
|
||||
+++ b/samples/CMakeLists.txt
|
||||
@@ -77,11 +77,10 @@ if( EXPAT_FOUND )
|
||||
target_link_libraries(geotag
|
||||
PRIVATE
|
||||
exiv2-xmp
|
||||
- ${EXPAT_LIBRARIES}
|
||||
+ expat::expat
|
||||
)
|
||||
target_include_directories(geotag PRIVATE ${CMAKE_BINARY_DIR}) # exv_conf.h
|
||||
target_include_directories(geotag PRIVATE ${CMAKE_SOURCE_DIR}/include) # <exiv2/exiv2.hpp>
|
||||
- target_include_directories(geotag PRIVATE ${EXPAT_INCLUDE_DIR})
|
||||
target_include_directories(geotag PRIVATE ${CMAKE_SOURCE_DIR}/src) # To find unused.h
|
||||
|
||||
if (WIN32)
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 26e5a95..5dc722c 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -154,8 +154,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 ${EXPAT_LIBRARIES})
|
||||
+ target_link_libraries(exiv2lib PRIVATE expat::expat)
|
||||
|
||||
if (WIN32)
|
||||
target_compile_definitions(exiv2lib PRIVATE XML_STATIC)
|
||||
diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt
|
||||
index a22698f..55102ce 100644
|
||||
--- a/xmpsdk/CMakeLists.txt
|
||||
+++ b/xmpsdk/CMakeLists.txt
|
||||
@@ -28,13 +28,12 @@ add_library(exiv2-xmp STATIC
|
||||
|
||||
target_link_libraries(exiv2-xmp
|
||||
PRIVATE
|
||||
- $<BUILD_INTERFACE:${EXPAT_LIBRARY}>
|
||||
+ $<BUILD_INTERFACE:expat::expat>
|
||||
)
|
||||
|
||||
target_include_directories(exiv2-xmp
|
||||
PRIVATE
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>
|
||||
- ${EXPAT_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
# Prevent a denial-service-attack related to XML entity expansion
|
||||
|
@ -1,8 +1,8 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Exiv2/exiv2
|
||||
REF ad5484cb1eaba3ad0e49b290d244f6b1ee9ff076 #v0.27.5
|
||||
SHA512 33b8c60990b05f1599860974d6fe44baba8369356acd2cab3ce4919a48bb44348ed0496ffc4581d9fd5eb8a1b36d48a0eaa3fafe4584bfd655d0a88e7a9458ef
|
||||
REF "v${VERSION}"
|
||||
SHA512 7d7121770a9394efd31acb74709583e587351fc48c485a2f684cacce4ed19a2d07a6cb1cea986c16bf64851fd53b22a7277c1e1ae1a6cd69a5761afae3c5c731
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-find_expat.patch
|
||||
@ -47,11 +47,6 @@ vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/exiv2)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if("nls" IN_LIST FEATURES)
|
||||
set(EXIV2_ENABLE_NLS ON)
|
||||
else()
|
||||
set(EXIV2_ENABLE_NLS OFF)
|
||||
endif()
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
|
||||
${CURRENT_PACKAGES_DIR}/share/${PORT}
|
||||
@ -60,13 +55,12 @@ configure_file(
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Clean
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/exiv2" "${CURRENT_PACKAGES_DIR}/lib/exiv2")
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/lib/exiv2"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
"${CURRENT_PACKAGES_DIR}/lib/exiv2"
|
||||
"${CURRENT_PACKAGES_DIR}/share/man"
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
|
@ -1,19 +1,17 @@
|
||||
_find_package(${ARGS})
|
||||
|
||||
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
|
||||
if(NOT @VCPKG_TARGET_IS_WINDOWS@)
|
||||
if(NOT "@VCPKG_TARGET_IS_WINDOWS@")
|
||||
find_package(Iconv REQUIRED)
|
||||
endif()
|
||||
if(@EXIV2_ENABLE_NLS@)
|
||||
if("@EXIV2_ENABLE_NLS@")
|
||||
find_package(Intl REQUIRED)
|
||||
endif()
|
||||
if(TARGET exiv2lib)
|
||||
if(NOT @VCPKG_TARGET_IS_WINDOWS@)
|
||||
set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES
|
||||
Iconv::Iconv
|
||||
)
|
||||
if(NOT "@VCPKG_TARGET_IS_WINDOWS@")
|
||||
set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES Iconv::Iconv)
|
||||
endif()
|
||||
if(@EXIV2_ENABLE_NLS@)
|
||||
if("@EXIV2_ENABLE_NLS@")
|
||||
set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${Intl_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
@ -1,10 +1,9 @@
|
||||
{
|
||||
"name": "exiv2",
|
||||
"version": "0.27.5",
|
||||
"port-version": 3,
|
||||
"version": "0.27.6",
|
||||
"description": "Image metadata library and tools",
|
||||
"homepage": "https://www.exiv2.org",
|
||||
"license": "GPL-2.0",
|
||||
"homepage": "https://exiv2.org",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
@ -24,6 +23,7 @@
|
||||
"nls": {
|
||||
"description": "Build native language support",
|
||||
"dependencies": [
|
||||
"gettext",
|
||||
{
|
||||
"name": "gettext",
|
||||
"host": true,
|
||||
@ -34,14 +34,14 @@
|
||||
]
|
||||
},
|
||||
"png": {
|
||||
"description": "Build with png support (requires libz)",
|
||||
"description": "Build with png support",
|
||||
"dependencies": [
|
||||
"libpng",
|
||||
"zlib"
|
||||
]
|
||||
},
|
||||
"unicode": {
|
||||
"description": "Compile with unicode support on windows",
|
||||
"description": "Compile with Unicode support on Windows",
|
||||
"supports": "windows"
|
||||
},
|
||||
"video": {
|
||||
|
@ -2293,8 +2293,8 @@
|
||||
"port-version": 7
|
||||
},
|
||||
"exiv2": {
|
||||
"baseline": "0.27.5",
|
||||
"port-version": 3
|
||||
"baseline": "0.27.6",
|
||||
"port-version": 0
|
||||
},
|
||||
"expat": {
|
||||
"baseline": "2.5.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "19442ed87a9f3827ddb22debf6b446e4cdca2d4f",
|
||||
"version": "0.27.6",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "13c2dda832a1eaa7093a44089a029adbd32f487e",
|
||||
"version": "0.27.5",
|
||||
|
Loading…
Reference in New Issue
Block a user