forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hwinfo] add new port (microsoft#40637)
Co-authored-by: Jim wang (BEYONDSOFT CONSULTING INC) <[email protected]> Co-authored-by: jim wang <[email protected]> Co-authored-by: honglongyu <[email protected]>
- Loading branch information
1 parent
89685cc
commit dfa8003
Showing
5 changed files
with
64 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_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO lfreist/hwinfo | ||
REF 90829612dd4b67356fd643bd9ceee44b04dc8fde | ||
SHA512 9f27c983d8e435c12455001cb7c2a535e9c7d94fec871a8b82d965d41f9a6e739fe4263bb18a66cf50fb826e505cbc0ff6a7c8408a3d74f783f56fefb88110cc | ||
HEAD_REF main | ||
) | ||
|
||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" HWINFO_BUILD_SHARED) | ||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" HWINFO_BUILD_STATIC) | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
OPTIONS | ||
-DBUILD_EXAMPLES=OFF | ||
-DBUILD_TESTING=OFF | ||
-DHWINFO_SHARED=${HWINFO_BUILD_SHARED} | ||
-DHWINFO_STATIC=${HWINFO_BUILD_STATIC} | ||
) | ||
vcpkg_cmake_install() | ||
vcpkg_cmake_config_fixup( | ||
CONFIG_PATH "lib/cmake/hwinfo" | ||
) | ||
vcpkg_copy_pdbs() | ||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ) | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ) | ||
|
||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
|
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,4 @@ | ||
hwinfo provides CMake targets : | ||
find_package(hwinfo CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE hwinfo::hwinfo) | ||
|
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,17 @@ | ||
{ | ||
"name": "hwinfo", | ||
"version": "1", | ||
"description": "hwinfo provides an easy-to-use and modern C++ API for retrieving hardware information of your systems components such as CPU, RAM, GPU, Disks, Mainboard, ...", | ||
"homepage": "https://github.com/lfreist/hwinfo", | ||
"supports": "!uwp", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
] | ||
} |
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
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,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "a6d2e9185ff6fd053e1762dd85b20549ccaa324d", | ||
"version": "1", | ||
"port-version": 0 | ||
} | ||
] | ||
} |