diff options
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.patch | 51 |
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 @@ | |||
1 | From 53f1f5c714df1f0a2eb57c1ce00bc66fc9a1690e Mon Sep 17 00:00:00 2001 | ||
2 | From: Niklas Haas <git@haasn.xyz> | ||
3 | Date: Tue, 29 May 2018 07:34:00 +0200 | ||
4 | Subject: [PATCH 1/3] Fix the link order of libglslang and libHLSL | ||
5 | |||
6 | libglslang depends on libHLSL, so the latter needs to be specified last. | ||
7 | This fixes an issue when trying to build shaderc against system-wide | ||
8 | versions of libglslang/libHLSL, rather than the in-tree versions from | ||
9 | third_party. | ||
10 | |||
11 | Additionally, libshaderc_util also depends on SPIRV-Tools | ||
12 | |||
13 | Upstream-Status: Backport [21c8be385b3fab5edcb934a6d99f69fd389c4e67] | ||
14 | |||
15 | Signed-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 | |||
21 | diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt | ||
22 | index 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) | ||
34 | diff --git a/libshaderc_util/CMakeLists.txt b/libshaderc_util/CMakeLists.txt | ||
35 | index 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 | -- | ||
50 | 2.28.0 | ||
51 | |||