[exiv2] Make add nls feature (#18964)

This commit is contained in:
Matthias Kuhn 2021-07-20 01:42:44 +02:00 committed by GitHub
parent 3a28333d60
commit 7c42464ca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 6 deletions

View File

@ -17,6 +17,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
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)
@ -35,7 +36,6 @@ vcpkg_configure_cmake(
-DEXIV2_BUILD_SAMPLES=OFF
-DEXIV2_BUILD_DOC=OFF
-DEXIV2_ENABLE_EXTERNAL_XMP=OFF
-DEXIV2_ENABLE_NLS=OFF
-DEXIV2_ENABLE_PRINTUCS2=OFF
-DEXIV2_ENABLE_LENSDATA=ON
-DEXIV2_ENABLE_DYNAMIC_RUNTIME=${EXIV2_CRT_DYNAMIC}
@ -53,6 +53,11 @@ vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(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}
@ -70,4 +75,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
endif()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -2,11 +2,15 @@ _find_package(${ARGS})
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
find_package(Iconv REQUIRED)
find_package(Intl REQUIRED)
if(@EXIV2_ENABLE_NLS@)
find_package(Intl REQUIRED)
endif()
if(TARGET exiv2lib)
set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES
Iconv::Iconv
)
target_link_libraries(exiv2lib INTERFACE ${Intl_LIBRARIES})
if(@EXIV2_ENABLE_NLS@)
target_link_libraries(exiv2lib INTERFACE ${Intl_LIBRARIES})
endif()
endif()
endif()

View File

@ -1,14 +1,20 @@
{
"name": "exiv2",
"version": "0.27.4",
"port-version": 1,
"description": "Image metadata library and tools",
"homepage": "https://www.exiv2.org",
"supports": "!uwp",
"dependencies": [
"gettext",
"libiconv"
],
"features": {
"nls": {
"description": "Build native language support",
"dependencies": [
"gettext"
]
},
"png": {
"description": "Build with png support (requires libz)",
"dependencies": [

View File

@ -1898,7 +1898,7 @@
},
"exiv2": {
"baseline": "0.27.4",
"port-version": 0
"port-version": 1
},
"expat": {
"baseline": "2.4.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1e93f266421999dd82b931b2dbf672d255b14b43",
"version": "0.27.4",
"port-version": 1
},
{
"git-tree": "f716a33e59b24c79140216d836644fe0603e322b",
"version": "0.27.4",