From 17b5fd973f01da57ea0fbba215b6cd7cb3697dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Fri, 4 May 2018 19:56:50 -0700 Subject: [PATCH] Updated glslang. --- 3rdparty/glslang/SPIRV/CMakeLists.txt | 10 ++++++++-- 3rdparty/glslang/StandAlone/CMakeLists.txt | 5 +++++ 3rdparty/glslang/glslang/CMakeLists.txt | 10 ++++++++-- .../glslang/glslang/MachineIndependent/iomapper.cpp | 2 +- 3rdparty/glslang/hlsl/CMakeLists.txt | 10 ++++++++-- 5 files changed, 30 insertions(+), 7 deletions(-) mode change 100644 => 100755 3rdparty/glslang/StandAlone/CMakeLists.txt mode change 100644 => 100755 3rdparty/glslang/glslang/CMakeLists.txt diff --git a/3rdparty/glslang/SPIRV/CMakeLists.txt b/3rdparty/glslang/SPIRV/CMakeLists.txt index 1e32e275a..9d9d8033a 100755 --- a/3rdparty/glslang/SPIRV/CMakeLists.txt +++ b/3rdparty/glslang/SPIRV/CMakeLists.txt @@ -69,8 +69,14 @@ if(WIN32) endif(WIN32) if(ENABLE_GLSLANG_INSTALL) - install(TARGETS SPIRV SPVRemapper - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + if(BUILD_SHARED_LIBS) + install(TARGETS SPIRV SPVRemapper + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + else() + install(TARGETS SPIRV SPVRemapper + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/) endif(ENABLE_GLSLANG_INSTALL) diff --git a/3rdparty/glslang/StandAlone/CMakeLists.txt b/3rdparty/glslang/StandAlone/CMakeLists.txt old mode 100644 new mode 100755 index b0d863d35..d500121df --- a/3rdparty/glslang/StandAlone/CMakeLists.txt +++ b/3rdparty/glslang/StandAlone/CMakeLists.txt @@ -44,4 +44,9 @@ if(ENABLE_GLSLANG_INSTALL) install(TARGETS spirv-remap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + if(BUILD_SHARED_LIBS) + install(TARGETS glslang-default-resource-limits + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() endif(ENABLE_GLSLANG_INSTALL) diff --git a/3rdparty/glslang/glslang/CMakeLists.txt b/3rdparty/glslang/glslang/CMakeLists.txt old mode 100644 new mode 100755 index 4f33b5394..d495a3cfd --- a/3rdparty/glslang/glslang/CMakeLists.txt +++ b/3rdparty/glslang/glslang/CMakeLists.txt @@ -102,8 +102,14 @@ if(WIN32) endif(WIN32) if(ENABLE_GLSLANG_INSTALL) - install(TARGETS glslang - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + if(BUILD_SHARED_LIBS) + install(TARGETS glslang + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + else() + install(TARGETS glslang + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() endif(ENABLE_GLSLANG_INSTALL) if(ENABLE_GLSLANG_INSTALL) diff --git a/3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp b/3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp index ad22353b4..fd40329e3 100644 --- a/3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp +++ b/3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp @@ -132,7 +132,7 @@ public: target = &inputList; else if (base->getQualifier().storage == EvqVaryingOut) target = &outputList; - else if (base->getQualifier().isUniformOrBuffer()) + else if (base->getQualifier().isUniformOrBuffer() && !base->getQualifier().layoutPushConstant) target = &uniformList; if (target) { diff --git a/3rdparty/glslang/hlsl/CMakeLists.txt b/3rdparty/glslang/hlsl/CMakeLists.txt index a3b643f03..6d1d8e6ae 100755 --- a/3rdparty/glslang/hlsl/CMakeLists.txt +++ b/3rdparty/glslang/hlsl/CMakeLists.txt @@ -30,6 +30,12 @@ if(WIN32) endif(WIN32) if(ENABLE_GLSLANG_INSTALL) - install(TARGETS HLSL - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + if(BUILD_SHARED_LIBS) + install(TARGETS HLSL + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + else() + install(TARGETS HLSL + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() endif(ENABLE_GLSLANG_INSTALL)