diff options
| author | NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> | 2020-10-27 15:58:18 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-27 00:58:18 -0700 |
| commit | 44842bfd6a57a361f69db4c36c6a48d6ddb75e4f (patch) | |
| tree | eae485456a02b100aa00a6165178bee5100f43cb | |
| parent | dcbbc5ed0e0f59600d35c68833f5ceab4a3bf497 (diff) | |
| download | vcpkg-44842bfd6a57a361f69db4c36c6a48d6ddb75e4f.tar.gz vcpkg-44842bfd6a57a361f69db4c36c6a48d6ddb75e4f.zip | |
[xxhash] Add xxhsum as feature (#14227)
| -rw-r--r-- | ports/xxhash/CONTROL | 4 | ||||
| -rw-r--r-- | ports/xxhash/portfile.cmake | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/ports/xxhash/CONTROL b/ports/xxhash/CONTROL index e641b229a..e4be4cb27 100644 --- a/ports/xxhash/CONTROL +++ b/ports/xxhash/CONTROL @@ -1,4 +1,8 @@ Source: xxhash
Version: 0.8.0
+Port-Version: 1
Homepage: https://github.com/Cyan4973/xxHash
Description: Extremely fast hash algorithm
+
+Feature: xxhsum
+Description: Build the xxhsum binary
diff --git a/ports/xxhash/portfile.cmake b/ports/xxhash/portfile.cmake index 95a9c3c0d..817a557c2 100644 --- a/ports/xxhash/portfile.cmake +++ b/ports/xxhash/portfile.cmake @@ -1,5 +1,3 @@ -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Cyan4973/xxHash @@ -8,17 +6,25 @@ vcpkg_from_github( HEAD_REF dev ) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + xxhsum XXHASH_BUILD_XXHSUM +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/cmake_unofficial PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} ) vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/xxHash TARGET_PATH share/${PORT}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +if("xxhsum" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES xxhsum AUTO_CLEAN) +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
\ No newline at end of file |
