diff options
| author | myd7349 <myd7349@gmail.com> | 2019-09-30 23:51:44 +0800 |
|---|---|---|
| committer | Curtis J Bezault <curtbezault@gmail.com> | 2019-09-30 08:51:44 -0700 |
| commit | 281d107328a2d08304a0a0c100ae69d9f3656e2c (patch) | |
| tree | 6f78de31fcf251440015f7a7f0cf14622f999b1a | |
| parent | 4279a792081355844c93f91068111a9e42aa45ab (diff) | |
| download | vcpkg-281d107328a2d08304a0a0c100ae69d9f3656e2c.tar.gz vcpkg-281d107328a2d08304a0a0c100ae69d9f3656e2c.zip | |
[mathc] Add new port (#8394)2019.09
| -rw-r--r-- | ports/mathc/CMakeLists.txt | 24 | ||||
| -rw-r--r-- | ports/mathc/CONTROL | 4 | ||||
| -rw-r--r-- | ports/mathc/portfile.cmake | 30 |
3 files changed, 58 insertions, 0 deletions
diff --git a/ports/mathc/CMakeLists.txt b/ports/mathc/CMakeLists.txt new file mode 100644 index 000000000..7c221bec1 --- /dev/null +++ b/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/ports/mathc/CONTROL b/ports/mathc/CONTROL new file mode 100644 index 000000000..47292b5c4 --- /dev/null +++ b/ports/mathc/CONTROL @@ -0,0 +1,4 @@ +Source: mathc
+Version: 2019-09-29
+Description: Pure C math library for 2D and 3D programming
+Homepage: https://github.com/felselva/mathc
diff --git a/ports/mathc/portfile.cmake b/ports/mathc/portfile.cmake new file mode 100644 index 000000000..7b3d263e2 --- /dev/null +++ b/ports/mathc/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions)
+
+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_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT})
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+
+# CMake integration test
+vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT})
|
