vcpkg/ports/crc32c/portfile.cmake

32 lines
911 B
CMake
Raw Normal View History

2020-10-14 06:02:41 +08:00
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2018-01-30 04:59:21 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/crc32c
REF 1.1.2
SHA512 6325c52b5a6850b9f90086e0c0c86798c008af36e7cfd3a0216184a2d37b3bf7323481ddc6bfe4cbd5b31288b3ee6c69772d03085a13094cf95d00a9756a7196
2018-01-30 04:59:21 +08:00
HEAD_REF master
)
vcpkg_cmake_configure(
2018-01-30 04:59:21 +08:00
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DCRC32C_BUILD_TESTS=OFF
-DCRC32C_BUILD_BENCHMARKS=OFF
-DCRC32C_USE_GLOG=OFF
2018-01-30 04:59:21 +08:00
)
vcpkg_cmake_install()
2018-01-30 04:59:21 +08:00
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(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
2020-10-14 06:02:41 +08:00
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)