Skip to content

Commit 59af0c0

Browse files
seppeonErniGH
andauthored
shaderc: Add 2025.3 and prevent use of glslang::oglcompiler and glslang::hlsl (#27768)
* update shaderc * also prevent 2024.1 to use glslang::oglcompiler and glslang::hlsl * bump to 2025.3 version | update paches | justify the new IF * fix --------- Co-authored-by: Ernesto de Gracia Herranz <ernestodgh@jfrog.com>
1 parent 5f8a302 commit 59af0c0

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

recipes/shaderc/all/conandata.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
sources:
2+
"2025.3":
3+
url: "https://github.com/google/shaderc/archive/refs/tags/v2025.3.tar.gz"
4+
sha256: "a8e4a25e5c2686fd36981e527ed05e451fcfc226bddf350f4e76181371190937"
25
"2024.1":
36
url: "https://github.com/google/shaderc/archive/refs/tags/v2024.1.tar.gz"
47
sha256: "eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528"
@@ -9,6 +12,16 @@ sources:
912
url: "https://github.com/google/shaderc/archive/v2021.1.tar.gz"
1013
sha256: "047113bc4628da164a3cb845efc20d442728873f6054a68ab56d04a053f2c32b"
1114
patches:
15+
"2025.3":
16+
- patch_file: "patches/2025.3/use-conan-dependencies.patch"
17+
patch_description: "Replace third_party with Conan dependencies"
18+
patch_type: "conan"
19+
- patch_file: "patches/2021.1/adapt-update_build_version.py.patch"
20+
patch_description: "Adapt update_build_version.py for Conan"
21+
patch_type: "conan"
22+
- patch_file: "patches/2021.1/install-shaderc_util.patch"
23+
patch_description: "install() shaderc_util"
24+
patch_type: "conan"
1225
"2024.1":
1326
- patch_file: "patches/2023.6/use-conan-dependencies.patch"
1427
patch_description: "Replace third_party with Conan dependencies"
@@ -41,6 +54,7 @@ patches:
4154
patch_type: "conan"
4255
siprv_mapping:
4356
# TODO: bump me once newer versions are available on CCI
57+
"2025.3": "1.4.313.0"
4458
"2024.1": "1.3.261.1"
4559
# "2023.6": "1.3.261.1"
4660
"2023.6": "1.3.239.0"

recipes/shaderc/all/conanfile.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
88
from conan.tools.microsoft import is_msvc, is_msvc_static_runtime
99
from conan.tools.apple import fix_apple_shared_install_name
10+
from conan.tools.scm import Version
1011

1112
required_conan_version = ">=1.53.0"
1213

13-
1414
class ShadercConan(ConanFile):
1515
name = "shaderc"
1616
description = "A collection of tools, libraries and tests for shader compilation."
@@ -85,8 +85,9 @@ def generate(self):
8585
deps = CMakeDeps(self)
8686
deps.set_property("glslang::glslang-core", "cmake_target_name", "glslang")
8787
deps.set_property("glslang::osdependent", "cmake_target_name", "OSDependent")
88-
deps.set_property("glslang::oglcompiler", "cmake_target_name", "OGLCompiler")
89-
deps.set_property("glslang::hlsl", "cmake_target_name", "HLSL")
88+
if Version(self.version) < Version("2023.8"): # The change was made here :https://github.com/google/shaderc/commit/40bced4e1e205ecf44630d2dfa357655b6dabd04
89+
deps.set_property("glslang::oglcompiler", "cmake_target_name", "OGLCompiler")
90+
deps.set_property("glslang::hlsl", "cmake_target_name", "HLSL")
9091
deps.set_property("glslang::spirv", "cmake_target_name", "SPIRV")
9192
deps.generate()
9293

@@ -120,8 +121,7 @@ def package_info(self):
120121
self.cpp_info.requires = [
121122
"glslang::glslang-core",
122123
"glslang::osdependent",
123-
"glslang::oglcompiler",
124-
"glslang::hlsl",
124+
*(["glslang::oglcompiler", "glslang::hlsl"] if Version(self.version) < Version("2023.8") else []),
125125
"glslang::spirv",
126126
"spirv-tools::spirv-tools-core",
127127
"spirv-tools::spirv-tools-opt",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 06f5395..76e5179 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -130,7 +130,12 @@ endif(MSVC)
6+
7+
# Configure subdirectories.
8+
# We depend on these for later projects, so they should come first.
9+
-add_subdirectory(third_party)
10+
+find_package(glslang REQUIRED CONFIG)
11+
+find_package(SPIRV-Headers REQUIRED CONFIG)
12+
+find_package(SPIRV-Tools REQUIRED CONFIG)
13+
+set(glslang_SOURCE_DIR ${glslang_INCLUDE_DIRS})
14+
+set(SPIRV-Headers_SOURCE_DIR ${SPIRV-Headers_INCLUDE_DIR}/..)
15+
+set(spirv-tools_SOURCE_DIR ${SPIRV-Tools_INCLUDE_DIR}/..)
16+
17+
add_subdirectory(libshaderc_util)
18+
add_subdirectory(libshaderc)

recipes/shaderc/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
versions:
2+
"2025.3":
3+
folder: all
24
"2024.1":
35
folder: all
46
"2023.6":

0 commit comments

Comments
 (0)