early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,64 @@
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)
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)
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

76
externals/vcpkg/ports/exiv2/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,76 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Exiv2/exiv2
REF ad5484cb1eaba3ad0e49b290d244f6b1ee9ff076 #v0.27.5
SHA512 33b8c60990b05f1599860974d6fe44baba8369356acd2cab3ce4919a48bb44348ed0496ffc4581d9fd5eb8a1b36d48a0eaa3fafe4584bfd655d0a88e7a9458ef
HEAD_REF master
PATCHES
fix-find_expat.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
unicode EXIV2_ENABLE_WIN_UNICODE
xmp EXIV2_ENABLE_XMP
video EXIV2_ENABLE_VIDEO
png EXIV2_ENABLE_PNG
nls EXIV2_ENABLE_NLS
)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" EXIV2_CRT_DYNAMIC)
if("unicode" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS)
message(FATAL_ERROR "Feature unicode only supports Windows platform.")
endif()
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DEXIV2_BUILD_EXIV2_COMMAND=OFF
-DEXIV2_BUILD_UNIT_TESTS=OFF
-DEXIV2_BUILD_SAMPLES=OFF
-DEXIV2_BUILD_DOC=OFF
-DEXIV2_ENABLE_EXTERNAL_XMP=OFF
-DEXIV2_ENABLE_PRINTUCS2=OFF
-DEXIV2_ENABLE_LENSDATA=ON
-DEXIV2_ENABLE_DYNAMIC_RUNTIME=${EXIV2_CRT_DYNAMIC}
-DEXIV2_ENABLE_WEBREADY=OFF
-DEXIV2_ENABLE_CURL=OFF
-DEXIV2_ENABLE_SSH=OFF
-DEXIV2_ENABLE_BMFF=OFF
-DEXIV2_TEAM_EXTRA_WARNINGS=OFF
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF
-DEXIV2_TEAM_PACKAGING=OFF
-DEXIV2_TEAM_USE_SANITIZERS=OFF
)
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}
@ONLY
)
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")
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)

View File

@@ -0,0 +1,16 @@
_find_package(${ARGS})
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
find_package(Iconv REQUIRED)
if(@EXIV2_ENABLE_NLS@)
find_package(Intl REQUIRED)
endif()
if(TARGET exiv2lib)
set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES
Iconv::Iconv
)
if(@EXIV2_ENABLE_NLS@)
set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${Intl_LIBRARIES})
endif()
endif()
endif()

52
externals/vcpkg/ports/exiv2/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,52 @@
{
"name": "exiv2",
"version": "0.27.5",
"port-version": 1,
"description": "Image metadata library and tools",
"homepage": "https://www.exiv2.org",
"supports": "!uwp",
"dependencies": [
"libiconv",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"nls": {
"description": "Build native language support",
"dependencies": [
{
"name": "gettext",
"host": true,
"features": [
"tools"
]
}
]
},
"png": {
"description": "Build with png support (requires libz)",
"dependencies": [
"libpng",
"zlib"
]
},
"unicode": {
"description": "Compile with unicode support on windows"
},
"video": {
"description": "Build video support into library"
},
"xmp": {
"description": "Build with XMP metadata support",
"dependencies": [
"expat"
]
}
}
}