aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/spirv-tools/spirv-tools-shared.diff
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/spirv-tools/spirv-tools-shared.diff
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/spirv-tools/spirv-tools-shared.diff')
-rw-r--r--vcpkg/ports/spirv-tools/spirv-tools-shared.diff35
1 files changed, 35 insertions, 0 deletions
diff --git a/vcpkg/ports/spirv-tools/spirv-tools-shared.diff b/vcpkg/ports/spirv-tools/spirv-tools-shared.diff
new file mode 100644
index 0000000..e2bf13c
--- /dev/null
+++ b/vcpkg/ports/spirv-tools/spirv-tools-shared.diff
@@ -0,0 +1,35 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 75830b44..39cc039e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -390,10 +390,14 @@ add_custom_target(spirv-tools-shared-pkg-config ALL
+
+ # Install pkg-config file
+ if (ENABLE_SPIRV_TOOLS_INSTALL)
++ set(shared_pc "")
++ if(BUILD_SHARED_LIBS)
++ set(shared_pc "${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools-shared.pc")
++ endif()
+ install(
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools.pc
+- ${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools-shared.pc
++ ${shared_pc}
+ DESTINATION
+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ endif()
+diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
+index acfa0c12..b3286db3 100644
+--- a/source/CMakeLists.txt
++++ b/source/CMakeLists.txt
+@@ -425,6 +425,10 @@ if (ANDROID)
+ endif()
+
+ if(ENABLE_SPIRV_TOOLS_INSTALL)
++ if(NOT BUILD_SHARED_LIBS)
++ set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES EXCLUDE_FROM_ALL 1)
++ list(REMOVE_ITEM SPIRV_TOOLS_TARGETS ${SPIRV_TOOLS}-shared)
++ endif()
+ install(TARGETS ${SPIRV_TOOLS_TARGETS} EXPORT ${SPIRV_TOOLS}Targets)
+ export(EXPORT ${SPIRV_TOOLS}Targets FILE ${SPIRV_TOOLS}Target.cmake)
+