aboutsummaryrefslogtreecommitdiff
path: root/ports/glslang/CMakeLists-targets.patch
diff options
context:
space:
mode:
authorDavid Dubois <dexcelstraun7@gmail.com>2019-03-05 10:57:56 -0800
committerPhil Christensen <philc@microsoft.com>2019-03-05 10:57:56 -0800
commita50fbaa756be5821004b3e26dca4cfa41dd878b4 (patch)
tree220a1b7cdf5afa66d1e838e8c4fb10e898d1bdd1 /ports/glslang/CMakeLists-targets.patch
parentfd2330af7af3c8b523bec5e3de8fdbaf7ed75f5e (diff)
downloadvcpkg-a50fbaa756be5821004b3e26dca4cfa41dd878b4.tar.gz
vcpkg-a50fbaa756be5821004b3e26dca4cfa41dd878b4.zip
[glslang] Export CMake package files (#5513)
* Add patch file to make glslang known to pkg-config * Proper patch file * Fix paths in the patch file * Add missing space so patch file can apply * Remove debug/share directory * Export everything to the glslangConfig * Export the SPIRV target as well * Remove not-working patch for main CMake file * [glslang] Remove call to windows CRT changing function * [glslang] Remove unnecessary calls to install inside patch * [glslang] Check cmake imports correctly
Diffstat (limited to 'ports/glslang/CMakeLists-targets.patch')
-rw-r--r--ports/glslang/CMakeLists-targets.patch133
1 files changed, 133 insertions, 0 deletions
diff --git a/ports/glslang/CMakeLists-targets.patch b/ports/glslang/CMakeLists-targets.patch
new file mode 100644
index 000000000..73661fa35
--- /dev/null
+++ b/ports/glslang/CMakeLists-targets.patch
@@ -0,0 +1,133 @@
+diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake
+index 2097881..f0cddd7 100644
+--- a/ChooseMSVCCRT.cmake
++++ b/ChooseMSVCCRT.cmake
+@@ -102,4 +102,4 @@ set(MSVC_CRT
+ MT
+ MTd)
+
+-choose_msvc_crt(MSVC_CRT)
++# choose_msvc_crt(MSVC_CRT)
+diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt
+index 5bb3f0e..e7be6e6 100644
+--- a/OGLCompilersDLL/CMakeLists.txt
++++ b/OGLCompilersDLL/CMakeLists.txt
+@@ -9,6 +9,12 @@ if(WIN32)
+ endif(WIN32)
+
+ if(ENABLE_GLSLANG_INSTALL)
+- install(TARGETS OGLCompiler
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ install(TARGETS OGLCompiler EXPORT glslangConfig
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ )
++ export(TARGETS OGLCompiler
++ NAMESPACE glslang::
++ FILE "${CMAKE_CURRENT_BINARY_DIR}/OGLCompiler-config.cmake"
++ )
+ endif(ENABLE_GLSLANG_INSTALL)
+diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
+index b682419..3a10f1a 100755
+--- a/SPIRV/CMakeLists.txt
++++ b/SPIRV/CMakeLists.txt
+@@ -64,8 +64,14 @@ if(WIN32)
+ endif(WIN32)
+
+ if(ENABLE_GLSLANG_INSTALL)
+- install(TARGETS SPIRV SPVRemapper
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ install(TARGETS SPIRV EXPORT glslangConfig
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ )
++ export(TARGETS SPIRV
++ NAMESPACE glslang::
++ FILE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake"
++ )
+
+ install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
+ endif(ENABLE_GLSLANG_INSTALL)
+diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
+index 7a50ab6..b70345e 100644
+--- a/glslang/CMakeLists.txt
++++ b/glslang/CMakeLists.txt
+@@ -97,8 +97,19 @@ if(WIN32)
+ endif(WIN32)
+
+ if(ENABLE_GLSLANG_INSTALL)
+- install(TARGETS glslang
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ install(TARGETS glslang EXPORT glslangConfig
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ )
++ export(TARGETS glslang
++ NAMESPACE glslang::
++ FILE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake"
++ )
++ install(
++ EXPORT glslangConfig
++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/glslang"
++ NAMESPACE glslang::
++ )
+ endif(ENABLE_GLSLANG_INSTALL)
+
+ if(ENABLE_GLSLANG_INSTALL)
+diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt
+index 1bf49e1..edd733c 100644
+--- a/glslang/OSDependent/Unix/CMakeLists.txt
++++ b/glslang/OSDependent/Unix/CMakeLists.txt
+@@ -3,6 +3,12 @@ set_property(TARGET OSDependent PROPERTY FOLDER glslang)
+ set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON)
+
+ if(ENABLE_GLSLANG_INSTALL)
+- install(TARGETS OSDependent
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ install(TARGETS OSDependent EXPORT glslangConfig
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ )
++ export(TARGETS OSDependent
++ NAMESPACE glslang::
++ FILE "${CMAKE_CURRENT_BINARY_DIR}/OSDependent-config.cmake"
++ )
+ endif(ENABLE_GLSLANG_INSTALL)
+diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt
+index f257418..cadd70d 100644
+--- a/glslang/OSDependent/Windows/CMakeLists.txt
++++ b/glslang/OSDependent/Windows/CMakeLists.txt
+@@ -15,6 +15,12 @@ if(WIN32)
+ endif(WIN32)
+
+ if(ENABLE_GLSLANG_INSTALL)
+- install(TARGETS OSDependent
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ install(TARGETS OSDependent EXPORT glslangConfig
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ )
++ export(TARGETS OSDependent
++ NAMESPACE glslang::
++ FILE "${CMAKE_CURRENT_BINARY_DIR}/OSDependent-config.cmake"
++ )
+ endif(ENABLE_GLSLANG_INSTALL)
+diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt
+index 98dfad7..94d96a0 100755
+--- a/hlsl/CMakeLists.txt
++++ b/hlsl/CMakeLists.txt
+@@ -26,6 +26,12 @@ if(WIN32)
+ endif(WIN32)
+
+ if(ENABLE_GLSLANG_INSTALL)
+- install(TARGETS HLSL
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ install(TARGETS HLSL EXPORT glslangConfig
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ )
++ export(TARGETS HLSL
++ NAMESPACE glslang::
++ FILE "${CMAKE_CURRENT_BINARY_DIR}/HLSL-config.cmake"
++ )
+ endif(ENABLE_GLSLANG_INSTALL)