diff options
| author | Christoph Neuhauser <c.a.neuhauser@gmail.com> | 2021-07-23 18:04:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-23 09:04:43 -0700 |
| commit | 5ce620b6ba5c0d5834bf8e18b75c3c0c746e74cd (patch) | |
| tree | 56f024f6be92d75583c69d08d2acd88cc7ee4987 /ports | |
| parent | 635361d801244215606e992310b4203ea14a228e (diff) | |
| download | vcpkg-5ce620b6ba5c0d5834bf8e18b75c3c0c746e74cd.tar.gz vcpkg-5ce620b6ba5c0d5834bf8e18b75c3c0c746e74cd.zip | |
[shaderc] Add fix for installing shaderc_util (#18979)
* Added fix for installing shaderc_util in port shaderc.
* Restricted install of shaderc_util to static build.
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/shaderc/fix-install-shaderc_util.patch | 18 | ||||
| -rw-r--r-- | ports/shaderc/portfile.cmake | 1 | ||||
| -rw-r--r-- | ports/shaderc/vcpkg.json | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/ports/shaderc/fix-install-shaderc_util.patch b/ports/shaderc/fix-install-shaderc_util.patch new file mode 100644 index 000000000..7601f3020 --- /dev/null +++ b/ports/shaderc/fix-install-shaderc_util.patch @@ -0,0 +1,18 @@ +diff --git a/libshaderc_util/CMakeLists.txt b/libshaderc_util/CMakeLists.txt
+index 99ce3c4..4926203 100644
+--- a/libshaderc_util/CMakeLists.txt
++++ b/libshaderc_util/CMakeLists.txt
+@@ -49,6 +49,13 @@ target_link_libraries(shaderc_util PRIVATE
+ glslang OSDependent OGLCompiler HLSL glslang SPIRV
+ SPIRV-Tools-opt ${CMAKE_THREAD_LIBS_INIT})
+
++if(SHADERC_ENABLE_INSTALL AND NOT BUILD_SHARED_LIBS)
++ install(TARGETS shaderc_util
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++endif(SHADERC_ENABLE_INSTALL)
++
+ shaderc_add_tests(
+ TEST_PREFIX shaderc_util
+ LINK_LIBS shaderc_util
diff --git a/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake index 7d9596781..be59aa5ba 100644 --- a/ports/shaderc/portfile.cmake +++ b/ports/shaderc/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( PATCHES disable-update-version.patch fix-build-type.patch + fix-install-shaderc_util.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/build-version.inc DESTINATION ${SOURCE_PATH}/glslc/src) diff --git a/ports/shaderc/vcpkg.json b/ports/shaderc/vcpkg.json index 9d7b57a13..e7e490c00 100644 --- a/ports/shaderc/vcpkg.json +++ b/ports/shaderc/vcpkg.json @@ -1,6 +1,7 @@ { "name": "shaderc", "version": "2021.1", + "port-version": 1, "description": "A collection of tools, libraries and tests for shader compilation.", "homepage": "https://github.com/google/shaderc", "dependencies": [ |
