aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/crossguid/CONTROL4
-rw-r--r--ports/crossguid/portfile.cmake29
2 files changed, 33 insertions, 0 deletions
diff --git a/ports/crossguid/CONTROL b/ports/crossguid/CONTROL
new file mode 100644
index 000000000..533f0c78e
--- /dev/null
+++ b/ports/crossguid/CONTROL
@@ -0,0 +1,4 @@
+Source: crossguid
+Version: 0.2.2-2018-06-16
+Build-Depends: libuuid (!windows&!uwp&!osx&!android)
+Description: CrossGuid is a minimal, cross platform, C++ GUID library.
diff --git a/ports/crossguid/portfile.cmake b/ports/crossguid/portfile.cmake
new file mode 100644
index 000000000..90d692626
--- /dev/null
+++ b/ports/crossguid/portfile.cmake
@@ -0,0 +1,29 @@
+include(vcpkg_common_functions)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO graeme-hill/crossguid
+ REF c4f8e9b21f779abe287c022e73eeac365d430337
+ SHA512 38876f410d0014ad930b720312cecc99be1361b9810a21d5ffc1deba6221ea0e2aebd0da332adb18fd314d0477fd33410403120629b8df405bb64a9884e3d0b0
+ HEAD_REF master
+)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ message(STATUS "Warning: Dynamic building not supported. Building static instead")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DCROSSGUID_TESTS:BOOL=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/crossguid/cmake)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
+
+# Handle copyright
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/crossguid/LICENSE ${CURRENT_PACKAGES_DIR}/share/crossguid/copyright)