diff --git a/ports/hwinfo/portfile.cmake b/ports/hwinfo/portfile.cmake new file mode 100644 index 00000000000000..9cecae7a139449 --- /dev/null +++ b/ports/hwinfo/portfile.cmake @@ -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}") + diff --git a/ports/hwinfo/usage b/ports/hwinfo/usage new file mode 100644 index 00000000000000..522cf5879362de --- /dev/null +++ b/ports/hwinfo/usage @@ -0,0 +1,4 @@ +hwinfo provides CMake targets : + find_package(hwinfo CONFIG REQUIRED) + target_link_libraries(main PRIVATE hwinfo::hwinfo) + diff --git a/ports/hwinfo/vcpkg.json b/ports/hwinfo/vcpkg.json new file mode 100644 index 00000000000000..26320376f49302 --- /dev/null +++ b/ports/hwinfo/vcpkg.json @@ -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 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index c172daf31fdecc..3188754b20bbe3 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3504,6 +3504,10 @@ "baseline": "1.7.2", "port-version": 1 }, + "hwinfo": { + "baseline": "1", + "port-version": 0 + }, "hwloc": { "baseline": "2.10.0", "port-version": 1 diff --git a/versions/h-/hwinfo.json b/versions/h-/hwinfo.json new file mode 100644 index 00000000000000..eec68a64a45717 --- /dev/null +++ b/versions/h-/hwinfo.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "a6d2e9185ff6fd053e1762dd85b20549ccaa324d", + "version": "1", + "port-version": 0 + } + ] +}