mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 06:43:11 +08:00
[crc32c] init
This commit is contained in:
parent
340ff984cb
commit
bac500fb77
3
ports/crc32c/CONTROL
Normal file
3
ports/crc32c/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: crc32c
|
||||
Version: 1.0.5
|
||||
Description: CRC32C implementation with support for CPU-specific acceleration instructions.
|
38
ports/crc32c/portfile.cmake
Normal file
38
ports/crc32c/portfile.cmake
Normal file
@ -0,0 +1,38 @@
|
||||
include(vcpkg_common_functions)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(WARNING "building static")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO google/crc32c
|
||||
REF 12a65bfb328fefae5c05879132676f702a3f68e8
|
||||
SHA512 610b7c54b0247edd2d37ec18db68c1f8a55b60b2fd3ddcede41e6321eb45d040f513cece493cbdc67e881065a643c4972126864811ff08b24aa7e82642e54f56
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DCRC32C_BUILD_TESTS=OFF
|
||||
-DCRC32C_BUILD_BENCHMARKS=OFF
|
||||
-DCRC32C_USE_GLOG=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake")
|
||||
|
||||
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()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/crc32c RENAME copyright)
|
Loading…
Reference in New Issue
Block a user