forked from etc/pineapple-src
76 lines
2.4 KiB
CMake
Executable file
76 lines
2.4 KiB
CMake
Executable file
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)
|