mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 17:20:57 +08:00
[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:
parent
85a9996f00
commit
994bab29e7
31
ports/lfreist-hwinfo/portfile.cmake
Normal file
31
ports/lfreist-hwinfo/portfile.cmake
Normal 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}")
|
4
ports/lfreist-hwinfo/usage
Normal file
4
ports/lfreist-hwinfo/usage
Normal file
@ -0,0 +1,4 @@
|
||||
lfreist-hwinfo provides CMake targets :
|
||||
|
||||
find_package(lfreist-hwinfo CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE lfreist-hwinfo::hwinfo)
|
17
ports/lfreist-hwinfo/vcpkg.json
Normal file
17
ports/lfreist-hwinfo/vcpkg.json
Normal 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
|
||||
}
|
||||
]
|
||||
}
|
@ -4212,6 +4212,10 @@
|
||||
"baseline": "2.3.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"lfreist-hwinfo": {
|
||||
"baseline": "2024-09-01",
|
||||
"port-version": 0
|
||||
},
|
||||
"lib3mf": {
|
||||
"baseline": "2.3.2",
|
||||
"port-version": 0
|
||||
|
9
versions/l-/lfreist-hwinfo.json
Normal file
9
versions/l-/lfreist-hwinfo.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "061ae43971a6743618069deab568a608edb75570",
|
||||
"version-date": "2024-09-01",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user