diff --git a/ports/llnl-units/portfile.cmake b/ports/llnl-units/portfile.cmake new file mode 100644 index 00000000000000..906ddd608f79b7 --- /dev/null +++ b/ports/llnl-units/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LLNL/units + REF "v${VERSION}" + SHA512 b0c40248a25adff97d3bd6eb6899bf7ed9a4622857a6eb0d62d040db6e60141fac201362710bbe417d8c284adcec89f8742815fcf17f30557e822d8f4e08fc4e + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DUNITS_CMAKE_PROJECT_NAME=LLNL-UNITS + -DUNITS_ENABLE_TESTS=OFF + -DUNITS_BUILD_FUZZ_TARGETS=OFF + -DLLNL-UNITS_ENABLE_ERROR_ON_WARNINGS=OFF + -DLLNL-UNITS_ENABLE_EXTRA_COMPILER_WARNINGS=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME llnl-units CONFIG_PATH lib/cmake/llnl-units) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/llnl-units/usage b/ports/llnl-units/usage new file mode 100644 index 00000000000000..47da448bdd007e --- /dev/null +++ b/ports/llnl-units/usage @@ -0,0 +1,4 @@ +llnl-units provides CMake targets: + + find_package(llnl-units CONFIG REQUIRED) + target_link_libraries(main PRIVATE llnl-units::units) diff --git a/ports/llnl-units/vcpkg.json b/ports/llnl-units/vcpkg.json new file mode 100644 index 00000000000000..cdbfd29fd891f8 --- /dev/null +++ b/ports/llnl-units/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "llnl-units", + "version": "0.9.1", + "description": "A run-time C++ library for working with units of measurement and conversions between them and with string representations of units and measurements", + "homepage": "https://github.com/LLNL/units", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index a319aa059c0259..bea56b8d698e03 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5344,6 +5344,10 @@ "baseline": "9.2.0", "port-version": 0 }, + "llnl-units": { + "baseline": "0.9.1", + "port-version": 0 + }, "llvm": { "baseline": "17.0.2", "port-version": 3 diff --git a/versions/l-/llnl-units.json b/versions/l-/llnl-units.json new file mode 100644 index 00000000000000..12d2b1bad978d8 --- /dev/null +++ b/versions/l-/llnl-units.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "b74d9e624d6529738d4d2bb97541dfb2b4097033", + "version": "0.9.1", + "port-version": 0 + } + ] +}