summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/shaderc/files/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/shaderc/files/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch')
-rw-r--r--meta/recipes-graphics/shaderc/files/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-graphics/shaderc/files/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch b/meta/recipes-graphics/shaderc/files/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch
new file mode 100644
index 0000000000..1ca84a29bb
--- /dev/null
+++ b/meta/recipes-graphics/shaderc/files/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch
@@ -0,0 +1,51 @@
1From 53f1f5c714df1f0a2eb57c1ce00bc66fc9a1690e Mon Sep 17 00:00:00 2001
2From: Niklas Haas <git@haasn.xyz>
3Date: Tue, 29 May 2018 07:34:00 +0200
4Subject: [PATCH 1/3] Fix the link order of libglslang and libHLSL
5
6libglslang depends on libHLSL, so the latter needs to be specified last.
7This fixes an issue when trying to build shaderc against system-wide
8versions of libglslang/libHLSL, rather than the in-tree versions from
9third_party.
10
11Additionally, libshaderc_util also depends on SPIRV-Tools
12
13Upstream-Status: Backport [21c8be385b3fab5edcb934a6d99f69fd389c4e67]
14
15Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
16---
17 glslc/CMakeLists.txt | 2 +-
18 libshaderc_util/CMakeLists.txt | 4 ++--
19 2 files changed, 3 insertions(+), 3 deletions(-)
20
21diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt
22index acf6fb0..0f5d888 100644
23--- a/glslc/CMakeLists.txt
24+++ b/glslc/CMakeLists.txt
25@@ -18,7 +18,7 @@ add_library(glslc STATIC
26 shaderc_default_compile_options(glslc)
27 target_include_directories(glslc PUBLIC ${glslang_SOURCE_DIR})
28 target_link_libraries(glslc PRIVATE glslang OSDependent OGLCompiler
29- HLSL glslang SPIRV ${CMAKE_THREAD_LIBS_INIT})
30+ glslang SPIRV HLSL ${CMAKE_THREAD_LIBS_INIT})
31 target_link_libraries(glslc PRIVATE shaderc_util shaderc)
32
33 add_executable(glslc_exe src/main.cc)
34diff --git a/libshaderc_util/CMakeLists.txt b/libshaderc_util/CMakeLists.txt
35index ec0e8fb..ded089d 100644
36--- a/libshaderc_util/CMakeLists.txt
37+++ b/libshaderc_util/CMakeLists.txt
38@@ -28,8 +28,8 @@ target_include_directories(shaderc_util
39
40 find_package(Threads)
41 target_link_libraries(shaderc_util PRIVATE
42- glslang OSDependent OGLCompiler HLSL glslang SPIRV
43- SPIRV-Tools-opt ${CMAKE_THREAD_LIBS_INIT})
44+ glslang OSDependent OGLCompiler glslang HLSL SPIRV
45+ SPIRV-Tools-opt SPIRV-Tools ${CMAKE_THREAD_LIBS_INIT})
46
47 shaderc_add_tests(
48 TEST_PREFIX shaderc_util
49--
502.28.0
51