diff --git a/ports/lfreist-hwinfo/portfile.cmake b/ports/lfreist-hwinfo/portfile.cmake new file mode 100644 index 0000000000..8929177251 --- /dev/null +++ b/ports/lfreist-hwinfo/portfile.cmake @@ -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}") diff --git a/ports/lfreist-hwinfo/usage b/ports/lfreist-hwinfo/usage new file mode 100644 index 0000000000..ef561fee1c --- /dev/null +++ b/ports/lfreist-hwinfo/usage @@ -0,0 +1,4 @@ +lfreist-hwinfo provides CMake targets : + + find_package(lfreist-hwinfo CONFIG REQUIRED) + target_link_libraries(main PRIVATE lfreist-hwinfo::hwinfo) diff --git a/ports/lfreist-hwinfo/vcpkg.json b/ports/lfreist-hwinfo/vcpkg.json new file mode 100644 index 0000000000..62c2ad5079 --- /dev/null +++ b/ports/lfreist-hwinfo/vcpkg.json @@ -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 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index db282bcabb..bb1ce3afdf 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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 diff --git a/versions/l-/lfreist-hwinfo.json b/versions/l-/lfreist-hwinfo.json new file mode 100644 index 0000000000..abc891ebfa --- /dev/null +++ b/versions/l-/lfreist-hwinfo.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "061ae43971a6743618069deab568a608edb75570", + "version-date": "2024-09-01", + "port-version": 0 + } + ] +}