[lfreist-hwinfo] Add new port (#40706)

Co-authored-by: Jim wang (BEYONDSOFT CONSULTING INC) <v-wangjim@microsoft.com>
Co-authored-by: jim wang <122244446+jimwang118@users.noreply.github.com>
Co-authored-by: honglongyu <honglongyu@sansi.com>
This commit is contained in:
Hlongyu 2024-09-05 13:42:08 +08:00 committed by GitHub
parent 85a9996f00
commit 994bab29e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,31 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO lfreist/hwinfo
REF 46690dd36727b868c5bb7a7316bb2ee52a898349
SHA512 31ac0f2c405a817893146f4f8899ea05d831393bd1776c12257675385be25990cb77251d644fefb8ea0d179940ff782ede9036ea42a3f3050c36a66d978f0da6
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(
PACKAGE_NAME lfreist-hwinfo
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}")

View File

@ -0,0 +1,4 @@
lfreist-hwinfo provides CMake targets :
find_package(lfreist-hwinfo CONFIG REQUIRED)
target_link_libraries(main PRIVATE lfreist-hwinfo::hwinfo)

View File

@ -0,0 +1,17 @@
{
"name": "lfreist-hwinfo",
"version-date": "2024-09-01",
"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
}
]
}

View File

@ -4212,6 +4212,10 @@
"baseline": "2.3.0", "baseline": "2.3.0",
"port-version": 0 "port-version": 0
}, },
"lfreist-hwinfo": {
"baseline": "2024-09-01",
"port-version": 0
},
"lib3mf": { "lib3mf": {
"baseline": "2.3.2", "baseline": "2.3.2",
"port-version": 0 "port-version": 0

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "061ae43971a6743618069deab568a608edb75570",
"version-date": "2024-09-01",
"port-version": 0
}
]
}