File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.14 )
2+
3+ project (mathc LANGUAGES C )
4+
5+ include (GNUInstallDirs )
6+
7+ add_library (mathc mathc.c )
8+
9+ target_include_directories (
10+ mathc
11+ PUBLIC
12+ $<INSTALL_INTERFACE :${CMAKE_INSTALL_INCLUDEDIR} >
13+ )
14+
15+ set_target_properties (mathc PROPERTIES PUBLIC_HEADER mathc.h)
16+
17+ install (TARGETS mathc EXPORT unofficial-mathc-config)
18+
19+ install (
20+ EXPORT unofficial-mathc-config
21+ NAMESPACE unofficial::mathc::
22+ DESTINATION share/unofficial-mathc
23+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
24+ )
Original file line number Diff line number Diff line change 1+ Source: mathc
2+ Version: 2019-09-29
3+ Description: Pure C math library for 2D and 3D programming
4+ Homepage: https://github.com/felselva/mathc
Original file line number Diff line number Diff line change 1+ include (vcpkg_common_functions )
2+
3+ vcpkg_check_linkage (ONLY_STATIC_LIBRARY )
4+
5+ vcpkg_from_github (
6+ OUT_SOURCE_PATH SOURCE_PATH
7+ REPO felselva/mathc
8+ REF d672725203fc80f6f79fba64533b87d51c32d714
9+ SHA512 6db96b7ca9b26745b6ead774b547f6cccdecaef0b55cb766d4f26ae7149bbb72e2bd877cb7994455bd19cae129d014efaf40b50395b1114b7ac95dc6ed53bf34
10+ HEAD_REF master
11+ )
12+
13+ file (COPY ${CMAKE_CURRENT_LIST_DIR } /CMakeLists.txt DESTINATION ${SOURCE_PATH} )
14+
15+ vcpkg_configure_cmake (
16+ SOURCE_PATH ${SOURCE_PATH}
17+ PREFER_NINJA
18+ )
19+
20+ vcpkg_install_cmake ()
21+
22+ vcpkg_fixup_cmake_targets (CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT} )
23+
24+ file (REMOVE_RECURSE ${CURRENT_PACKAGES_DIR} /debug/include )
25+
26+ # Handle copyright
27+ configure_file (${SOURCE_PATH} /LICENSE ${CURRENT_PACKAGES_DIR} /share/${PORT}/copyright COPYONLY )
28+
29+ # CMake integration test
30+ vcpkg_test_cmake (PACKAGE_NAME unofficial-${PORT} )
You can’t perform that action at this time.
0 commit comments