diff options
| author | Nic Holthaus <nholthaus@gmail.com> | 2017-09-18 19:12:32 -0400 |
|---|---|---|
| committer | Nic Holthaus <nholthaus@gmail.com> | 2017-09-18 19:12:32 -0400 |
| commit | 0b10f30a99ec2c423125a8137b7c6caef93013ef (patch) | |
| tree | 6f360330711f586be15319da16fa7afa41570ea7 | |
| parent | 03a50fc6f591d5eba29dfa7973ad71df6bc86c8b (diff) | |
| download | vcpkg-0b10f30a99ec2c423125a8137b7c6caef93013ef.tar.gz vcpkg-0b10f30a99ec2c423125a8137b7c6caef93013ef.zip | |
Add port for nholthaus/units
| -rw-r--r-- | ports/units/CONTROL | 3 | ||||
| -rw-r--r-- | ports/units/portfile.cmake | 40 |
2 files changed, 43 insertions, 0 deletions
diff --git a/ports/units/CONTROL b/ports/units/CONTROL new file mode 100644 index 000000000..b66a3b828 --- /dev/null +++ b/ports/units/CONTROL @@ -0,0 +1,3 @@ +Source: units +Version: 2.3.0 +Description: A compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies. diff --git a/ports/units/portfile.cmake b/ports/units/portfile.cmake new file mode 100644 index 000000000..0c71a5287 --- /dev/null +++ b/ports/units/portfile.cmake @@ -0,0 +1,40 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nholthaus/units + REF v2.3.0 + SHA512 1b9d7806e82d0f437574562e647077b6d22c0add81a19b5ec71f53ab608642db2d785a70d03d13cb2eeea2a8bc2d20f112b6bdf49acf0afce44e8e07bb6b7c39 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DBUILD_TESTS=OFF + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/units RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/units) +file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/unitsConfig.cmake ${CURRENT_PACKAGES_DIR}/share/units/unitsConfig.cmake) + +# remove uneeded directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
\ No newline at end of file |
