aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/fixed-math
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/fixed-math')
-rw-r--r--vcpkg/ports/fixed-math/disable-cpm.patch12
-rw-r--r--vcpkg/ports/fixed-math/portfile.cmake24
-rw-r--r--vcpkg/ports/fixed-math/vcpkg.json17
3 files changed, 53 insertions, 0 deletions
diff --git a/vcpkg/ports/fixed-math/disable-cpm.patch b/vcpkg/ports/fixed-math/disable-cpm.patch
new file mode 100644
index 0000000..2338ea2
--- /dev/null
+++ b/vcpkg/ports/fixed-math/disable-cpm.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bfd3c01..d9f7abe 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.21 FATAL_ERROR )
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
+
+ include(get_fixed_math_version)
+-include(cmake/CPM.cmake)
+
+ project(fixed_math
+ LANGUAGES CXX
diff --git a/vcpkg/ports/fixed-math/portfile.cmake b/vcpkg/ports/fixed-math/portfile.cmake
new file mode 100644
index 0000000..828e003
--- /dev/null
+++ b/vcpkg/ports/fixed-math/portfile.cmake
@@ -0,0 +1,24 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO arturbac/fixed_math
+ REF "v${VERSION}"
+ SHA512 fc1415e205cc5f2a63ad8019397c9aad082a7f256d050f894b3e2b6f3824396142333004a3a11a024594d7c95e5b302e8cab75faa9fc3563a5e04db1791efaf6
+ HEAD_REF master
+ PATCHES
+ disable-cpm.patch
+)
+
+set(VCPKG_BUILD_TYPE release) # header-only port
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DFIXEDMATH_ENABLE_UNIT_TESTS=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(PACKAGE_NAME fixed_math CONFIG_PATH lib/cmake/fixed_math)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENCE")
diff --git a/vcpkg/ports/fixed-math/vcpkg.json b/vcpkg/ports/fixed-math/vcpkg.json
new file mode 100644
index 0000000..ddfa252
--- /dev/null
+++ b/vcpkg/ports/fixed-math/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "fixed-math",
+ "version": "2.2.0",
+ "description": "A High-Performance C++23, C++17 Library for Fixed-Point 48.16 Arithmetic",
+ "homepage": "https://github.com/arturbac/fixed_math",
+ "license": "BSL-1.0",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}