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
REF 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99
SHA512 672d5d2e823e72ed20d0d5f8f993b797a39109f99734b25db8eefdefa47e54df83d0644798ecb04891f68544e9e407a816ec6901027f14ef116f186b07043c18
2017-10-01 06:43:10 +08:00
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
2017-10-01 06:43:10 +08:00
)
2018-02-24 15:36:52 +08:00
vcpkg_apply_patches(
SOURCE_PATH "${SOURCE_PATH}"
PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-iconv.patch"
)
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)