mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 17:17:50 +08:00
a50fbaa756
* 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
134 lines
4.6 KiB
Diff
134 lines
4.6 KiB
Diff
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)
|