vcpkg/ports/shaderc/fix-install-shaderc_util.patch
Christoph Neuhauser 5ce620b6ba
[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.
2021-07-23 09:04:43 -07:00

19 lines
704 B
Diff

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