vcpkg/ports/exiv2/portfile.cmake

42 lines
1.2 KiB
CMake
Raw Normal View History

2017-10-01 06:43:10 +08:00
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Exiv2/exiv2
2018-02-26 03:37:23 +08:00
REF 28fa146d9758230ea65e2b89574095514aa50429
SHA512 710020dd404d43edd268a9229f240222b185576d8c277884c57479d291d0f3145b6076d0225849c38ab2e618d113dbc61cd6a60d4545e2a44797a63a2f01a603
2017-10-01 06:43:10 +08:00
HEAD_REF master
)
2018-02-24 15:36:52 +08:00
vcpkg_apply_patches(
SOURCE_PATH "${SOURCE_PATH}"
PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-iconv.patch"
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
2017-10-01 06:43:10 +08:00
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH "share/exiv2/cmake")
2017-10-01 06:43:10 +08:00
vcpkg_copy_pdbs()
# Clean
file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(REMOVE ${EXE})
file(REMOVE ${DEBUG_EXE})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
2017-10-01 06:43:10 +08:00
# Handle copyright
file(COPY ${SOURCE_PATH}/ABOUT-NLS DESTINATION ${CURRENT_PACKAGES_DIR}/share/exiv2)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/exiv2/ABOUT-NLS ${CURRENT_PACKAGES_DIR}/share/exiv2/copyright)