Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update shaderc #6689

Merged
merged 9 commits into from
Jun 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
241 changes: 108 additions & 133 deletions ports/glslang/CMakeLists-targets.patch
Original file line number Diff line number Diff line change
@@ -1,133 +1,108 @@
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)
diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake
index 2097881..f6320a9 100644
--- a/ChooseMSVCCRT.cmake
+++ b/ChooseMSVCCRT.cmake
@@ -102,4 +102,3 @@ set(MSVC_CRT
MT
MTd)

-choose_msvc_crt(MSVC_CRT)
diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt
index 5bb3f0e..90ba3be 100644
--- a/OGLCompilersDLL/CMakeLists.txt
+++ b/OGLCompilersDLL/CMakeLists.txt
@@ -9,6 +9,7 @@ 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})
endif(ENABLE_GLSLANG_INSTALL)
diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
index 1997e74..e2a0229 100644
--- a/SPIRV/CMakeLists.txt
+++ b/SPIRV/CMakeLists.txt
@@ -46,7 +46,6 @@ endif(ENABLE_NV_EXTENSIONS)
add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
set_property(TARGET SPIRV PROPERTY FOLDER glslang)
set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
-target_include_directories(SPIRV PUBLIC ..)

if (ENABLE_SPVREMAPPER)
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
@@ -78,13 +77,13 @@ if(WIN32)
endif(WIN32)

if(ENABLE_GLSLANG_INSTALL)
- if(BUILD_SHARED_LIBS)
+ if(BUILD_SHARED_LIBS OR TRUE)
if (ENABLE_SPVREMAPPER)
install(TARGETS SPVRemapper
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
- install(TARGETS SPIRV
+ install(TARGETS SPIRV EXPORT glslangConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
else()
diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
index 5f51476..7f11498 100644
--- a/glslang/CMakeLists.txt
+++ b/glslang/CMakeLists.txt
@@ -86,7 +86,6 @@ add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${H
set_property(TARGET glslang PROPERTY FOLDER glslang)
set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(glslang OGLCompiler OSDependent)
-target_include_directories(glslang PUBLIC ..)

if(WIN32 AND BUILD_SHARED_LIBS)
set_target_properties(glslang PROPERTIES PREFIX "")
@@ -105,10 +104,15 @@ if(WIN32)
endif(WIN32)

if(ENABLE_GLSLANG_INSTALL)
- if(BUILD_SHARED_LIBS)
- install(TARGETS glslang
+ if(BUILD_SHARED_LIBS OR TRUE)
+ install(TARGETS glslang EXPORT glslangConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(
+ EXPORT glslangConfig
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/glslang"
+ NAMESPACE glslang::
+ )
else()
install(TARGETS glslang
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt
index e652f45..a9673fe 100644
--- a/glslang/OSDependent/Unix/CMakeLists.txt
+++ b/glslang/OSDependent/Unix/CMakeLists.txt
@@ -20,6 +20,6 @@ else()
endif()

if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS OSDependent
+ install(TARGETS OSDependent EXPORT glslangConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(ENABLE_GLSLANG_INSTALL)
diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt
index f918d7a..329800f 100644
--- a/hlsl/CMakeLists.txt
+++ b/hlsl/CMakeLists.txt
@@ -32,8 +32,8 @@ if(WIN32)
endif(WIN32)

if(ENABLE_GLSLANG_INSTALL)
- if(BUILD_SHARED_LIBS)
- install(TARGETS HLSL
+ if(BUILD_SHARED_LIBS OR TRUE)
+ install(TARGETS HLSL EXPORT glslangConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
else()
12 changes: 12 additions & 0 deletions ports/glslang/CMakeLists-windows.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt
index f257418..82a3f3c 100644
--- a/glslang/OSDependent/Windows/CMakeLists.txt
+++ b/glslang/OSDependent/Windows/CMakeLists.txt
@@ -15,6 +15,6 @@ if(WIN32)
endif(WIN32)

if(ENABLE_GLSLANG_INSTALL)
- install(TARGETS OSDependent
+ install(TARGETS OSDependent EXPORT glslangConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(ENABLE_GLSLANG_INSTALL)
4 changes: 2 additions & 2 deletions ports/glslang/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: glslang
Version: 2018-03-02-2
Version: 2019-03-05
Homepage: https://github.com/KhronosGroup/glslang
Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator
Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator
7 changes: 3 additions & 4 deletions ports/glslang/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/glslang
REF b5b5f918c6b72d7cf2ee73641cc6c6ddb211ca70
SHA512 ec0f7a23fa60457a481c7b3acf4c127c3bf898d23655d346aeafb304f74e798d632c83d676873f2c764d241de6dc4392cff8d6ce0ee509a4b74ee2233b01c008
REF f88e5824d2cfca5edc58c7c2101ec9a4ec36afac
SHA512 92dc287e8930db6e00bde23b770f763dc3cf8a405a37b682bbd65e1dbde1f1f5161543fcc70b09eef07a5ce8bbe8f368ef84ac75003c122f42d1f6b9eaa8bd50
HEAD_REF master
PATCHES
CMakeLists-targets.patch
CMakeLists-windows.patch
)

vcpkg_configure_cmake(
Expand All @@ -20,8 +21,6 @@ vcpkg_configure_cmake(

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets()

file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
Expand Down
23 changes: 0 additions & 23 deletions ports/shaderc/0001-Add-a-virtual-destructor.patch

This file was deleted.

30 changes: 0 additions & 30 deletions ports/shaderc/0001-Do-not-generate-build-version.inc.patch

This file was deleted.

4 changes: 2 additions & 2 deletions ports/shaderc/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: shaderc
Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-2
Version: 2019-06-26
Homepage: https://github.com/google/shaderc
Description: A collection of tools, libraries and tests for shader compilation.
Build-Depends: glslang, spirv-tools
Build-Depends: glslang, spirv-tools
8 changes: 5 additions & 3 deletions ports/shaderc/build-version.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"shaderc v2016.2-dev unknown hash, 2016-12-02\n"
"spirv-tools v2016.6-dev unknown hash, 2016-12-02\n"
"glslang unknown hash, 2016-12-02\n"
"shaderc v2019.0-dev unknown hash, 2019-05-08\n"
"spirv-tools v2019.3-dev unknown hash, 2019-04-03\n"
"glslang unknown hash, 2019-03-05\n"


Loading