-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cpu-features] Add new port (#12681)
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") | ||
|
||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO google/cpu_features | ||
REF b9593c8b395318bb2bc42683a94f962564cc4664 # 0.4.1 | ||
SHA512 8c12b50741e2979a32b69c788934bee0d00811b7662006c8b493e98d5efeada67ed59460be40c234b2d3bafd85671cb1a1d7c1a6ee535a7fc1cc6ac56a754576 | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS | ||
) | ||
|
||
vcpkg_install_cmake() | ||
|
||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CpuFeatures TARGET_PATH share/CpuFeatures) | ||
|
||
if("tools" IN_LIST FEATURES) | ||
vcpkg_copy_tools(TOOL_NAMES list_cpu_features) | ||
endif() | ||
vcpkg_clean_executables_in_bin(FILE_NAMES list_cpu_features) | ||
|
||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) | ||
|
||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "cpu-features", | ||
"version-string": "0.4.1", | ||
"description": "A cross-platform C library to retrieve CPU features (such as available instructions) at runtime", | ||
"homepage": "https://github.com/google/cpu_features", | ||
"license": "Apache-2.0", | ||
"supports": "!(arm | uwp)", | ||
"features": [ | ||
{ | ||
"name": "tools", | ||
"description": "list_cpu_features command line tool" | ||
} | ||
] | ||
} |