vcpkg/ports/crc32c/portfile.cmake

34 lines
981 B
CMake
Raw Normal View History

2018-01-30 04:59:21 +08:00
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/crc32c
REF 1.0.7
SHA512 fe384ea15976b1317b7f6be3a447ae2cf25e0baa80f6c5e1231719a2af8863bc156b3d33156f24eca85504083730937f81fb624311d27e94ba3d2456bf3d34fa
2018-01-30 04:59:21 +08:00
HEAD_REF master
2018-12-15 12:12:44 +08:00
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_export_symbols.patch
2018-01-30 04:59:21 +08:00
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCRC32C_BUILD_TESTS=OFF
-DCRC32C_BUILD_BENCHMARKS=OFF
-DCRC32C_USE_GLOG=OFF
2018-01-30 04:59:21 +08:00
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Crc32c")
2018-01-30 04:59:21 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
2018-01-30 04:59:21 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/crc32c RENAME copyright)