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/mathc | |
Diffstat (limited to 'vcpkg/ports/mathc')
| -rw-r--r-- | vcpkg/ports/mathc/CMakeLists.txt | 24 | ||||
| -rw-r--r-- | vcpkg/ports/mathc/portfile.cmake | 24 | ||||
| -rw-r--r-- | vcpkg/ports/mathc/vcpkg.json | 17 |
3 files changed, 65 insertions, 0 deletions
diff --git a/vcpkg/ports/mathc/CMakeLists.txt b/vcpkg/ports/mathc/CMakeLists.txt new file mode 100644 index 0000000..7c221be --- /dev/null +++ b/vcpkg/ports/mathc/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.14)
+
+project(mathc LANGUAGES C)
+
+include(GNUInstallDirs)
+
+add_library(mathc mathc.c)
+
+target_include_directories(
+ mathc
+ PUBLIC
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+)
+
+set_target_properties(mathc PROPERTIES PUBLIC_HEADER mathc.h)
+
+install(TARGETS mathc EXPORT unofficial-mathc-config)
+
+install(
+ EXPORT unofficial-mathc-config
+ NAMESPACE unofficial::mathc::
+ DESTINATION share/unofficial-mathc
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+)
diff --git a/vcpkg/ports/mathc/portfile.cmake b/vcpkg/ports/mathc/portfile.cmake new file mode 100644 index 0000000..80149f3 --- /dev/null +++ b/vcpkg/ports/mathc/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO felselva/mathc
+ REF d672725203fc80f6f79fba64533b87d51c32d714
+ SHA512 6db96b7ca9b26745b6ead774b547f6cccdecaef0b55cb766d4f26ae7149bbb72e2bd877cb7994455bd19cae129d014efaf40b50395b1114b7ac95dc6ed53bf34
+ HEAD_REF master
+)
+
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT})
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+# Handle copyright
+configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
diff --git a/vcpkg/ports/mathc/vcpkg.json b/vcpkg/ports/mathc/vcpkg.json new file mode 100644 index 0000000..531276a --- /dev/null +++ b/vcpkg/ports/mathc/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "mathc", + "version-date": "2019-09-29", + "port-version": 3, + "description": "Pure C math library for 2D and 3D programming", + "homepage": "https://github.com/felselva/mathc", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |