aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/stduuid/fix-gsl-polyfill.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/stduuid/fix-gsl-polyfill.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/stduuid/fix-gsl-polyfill.patch')
-rw-r--r--vcpkg/ports/stduuid/fix-gsl-polyfill.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/vcpkg/ports/stduuid/fix-gsl-polyfill.patch b/vcpkg/ports/stduuid/fix-gsl-polyfill.patch
new file mode 100644
index 0000000..3ae0359
--- /dev/null
+++ b/vcpkg/ports/stduuid/fix-gsl-polyfill.patch
@@ -0,0 +1,35 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -43,11 +43,11 @@ if (UUID_TIME_GENERATOR)
+ endif()
+
+ # Using span from std
+-if (NOT UUID_USING_CXX20_SPAN)
+- target_include_directories(${PROJECT_NAME} INTERFACE
+- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+- $<INSTALL_INTERFACE:include>)
+- install(DIRECTORY gsl DESTINATION include)
++if (UUID_USING_CXX20_SPAN)
++ target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_20)
++else()
++ find_package(Microsoft.GSL CONFIG REQUIRED)
++ target_link_libraries(${PROJECT_NAME} INTERFACE Microsoft.GSL::GSL)
+ endif ()
+
+ if(UUID_ENABLE_INSTALL)
+diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in
+--- a/cmake/Config.cmake.in
++++ b/cmake/Config.cmake.in
+@@ -9,6 +9,10 @@ if (@UUID_SYSTEM_GENERATOR@)
+ endif ()
+ endif ()
+
++if (NOT "@UUID_USING_CXX20_SPAN@")
++ find_dependency(Microsoft.GSL)
++endif ()
++
+ include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake")
+
+ check_required_components(@PROJECT_NAME@)
+\ No newline at end of file