diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/orange-math | |
Diffstat (limited to 'vcpkg/ports/orange-math')
| -rw-r--r-- | vcpkg/ports/orange-math/portfile.cmake | 42 | ||||
| -rw-r--r-- | vcpkg/ports/orange-math/vcpkg.json | 30 |
2 files changed, 72 insertions, 0 deletions
diff --git a/vcpkg/ports/orange-math/portfile.cmake b/vcpkg/ports/orange-math/portfile.cmake new file mode 100644 index 0000000..180866e --- /dev/null +++ b/vcpkg/ports/orange-math/portfile.cmake @@ -0,0 +1,42 @@ +if (VCPKG_TARGET_IS_WINDOWS)
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO orange-cpp/omath
+ REF "v${VERSION}"
+ SHA512 45d78e35d6bf9d7bbf511f27b77a0d2300033faf581f3c67f7c97f6e529842f520bec844fdee12000d53b5abd2c1e3acd04393429edf639b199501e53d333c1b
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" OMATH_SHARED)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ "avx2" OMATH_USE_AVX2
+ "imgui" OMATH_IMGUI_INTEGRATION
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${FEATURE_OPTIONS}
+ -DOMATH_USE_UNITY_BUILD=ON
+ -DOMATH_BUILD_TESTS=OFF
+ -DOMATH_THREAT_WARNING_AS_ERROR=OFF
+ -DOMATH_BUILD_AS_SHARED_LIBRARY=${OMATH_SHARED}
+ -DOMATH_BUILD_TESTS=OFF
+ -DOMATH_BUILD_BENCHMARK=OFF
+ -DOMATH_BUILD_EXAMPLES=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/omath" PACKAGE_NAME "omath")
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/debug/include"
+)
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/orange-math/vcpkg.json b/vcpkg/ports/orange-math/vcpkg.json new file mode 100644 index 0000000..dca9a58 --- /dev/null +++ b/vcpkg/ports/orange-math/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "orange-math", + "version": "4.2.0", + "description": "General purpose math library", + "homepage": "https://github.com/orange-cpp/omath", + "license": "Zlib", + "supports": "windows | linux", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "avx2": { + "description": "Omath will use AVX2 to boost performance", + "supports": "!arm" + }, + "imgui": { + "description": "Omath will define method to convert omath types to imgui types", + "dependencies": [ + "imgui" + ] + } + } +} |