aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alex@karatarakis.com>2017-09-18 18:50:19 -0700
committerGitHub <noreply@github.com>2017-09-18 18:50:19 -0700
commitc2a735f6bee792d2419b0616eaa84abef91536e6 (patch)
tree0479c8a5a21f61f12f2e0c34d887a61ec8ea8b84
parent03a50fc6f591d5eba29dfa7973ad71df6bc86c8b (diff)
parent2e6bb72599d3789ac7af530cde0d56afab0a76ff (diff)
downloadvcpkg-c2a735f6bee792d2419b0616eaa84abef91536e6.tar.gz
vcpkg-c2a735f6bee792d2419b0616eaa84abef91536e6.zip
Merge pull request #1842 from nholthaus/master
new package - units
-rw-r--r--ports/units/CONTROL3
-rw-r--r--ports/units/portfile.cmake25
2 files changed, 28 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..910626f6d
--- /dev/null
+++ b/ports/units/portfile.cmake
@@ -0,0 +1,25 @@
+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
+)
+
+vcpkg_install_cmake()
+
+# Handle copyright/readme/package files
+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