1617a3babSopenharmony_ci# Copyright (C) 2018 Google, Inc.
2617a3babSopenharmony_ci#
3617a3babSopenharmony_ci# All rights reserved.
4617a3babSopenharmony_ci#
5617a3babSopenharmony_ci# Redistribution and use in source and binary forms, with or without
6617a3babSopenharmony_ci# modification, are permitted provided that the following conditions
7617a3babSopenharmony_ci# are met:
8617a3babSopenharmony_ci#
9617a3babSopenharmony_ci#    Redistributions of source code must retain the above copyright
10617a3babSopenharmony_ci#    notice, this list of conditions and the following disclaimer.
11617a3babSopenharmony_ci#
12617a3babSopenharmony_ci#    Redistributions in binary form must reproduce the above
13617a3babSopenharmony_ci#    copyright notice, this list of conditions and the following
14617a3babSopenharmony_ci#    disclaimer in the documentation and/or other materials provided
15617a3babSopenharmony_ci#    with the distribution.
16617a3babSopenharmony_ci#
17617a3babSopenharmony_ci#    Neither the name of Google Inc. nor the names of its
18617a3babSopenharmony_ci#    contributors may be used to endorse or promote products derived
19617a3babSopenharmony_ci#    from this software without specific prior written permission.
20617a3babSopenharmony_ci#
21617a3babSopenharmony_ci# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22617a3babSopenharmony_ci# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23617a3babSopenharmony_ci# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24617a3babSopenharmony_ci# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25617a3babSopenharmony_ci# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26617a3babSopenharmony_ci# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27617a3babSopenharmony_ci# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28617a3babSopenharmony_ci# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29617a3babSopenharmony_ci# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30617a3babSopenharmony_ci# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31617a3babSopenharmony_ci# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32617a3babSopenharmony_ci# POSSIBILITY OF SUCH DAMAGE.
33617a3babSopenharmony_ci
34617a3babSopenharmony_ciimport("//build/ohos.gni")
35617a3babSopenharmony_ciimport("build_overrides/glslang.gni")
36617a3babSopenharmony_ci
37617a3babSopenharmony_ci# Both Chromium and Fuchsia use by default a set of warning errors
38617a3babSopenharmony_ci# that is far too strict to compile this project. These are also
39617a3babSopenharmony_ci# typically appended after |cflags|, overriding target-specific
40617a3babSopenharmony_ci# definitions. To work around this, determine which configs to
41617a3babSopenharmony_ci# add and remove in order to succesfully build the project.
42617a3babSopenharmony_ciif (defined(is_fuchsia_tree) && is_fuchsia_tree) {
43617a3babSopenharmony_ci  _configs_to_remove = [ "//build/config:default_warnings" ]
44617a3babSopenharmony_ci  _configs_to_add = []
45617a3babSopenharmony_ci} else {
46617a3babSopenharmony_ci  _configs_to_remove = [ "//build/config/compiler:chromium_code" ]
47617a3babSopenharmony_ci  _configs_to_add = [ "//build/config/compiler:no_chromium_code" ]
48617a3babSopenharmony_ci}
49617a3babSopenharmony_ci
50617a3babSopenharmony_ciaction("glslang_build_info") {
51617a3babSopenharmony_ci  script = "build_info.py"
52617a3babSopenharmony_ci
53617a3babSopenharmony_ci  src_dir = "."
54617a3babSopenharmony_ci  changes_file = "CHANGES.md"
55617a3babSopenharmony_ci  template_file = "build_info.h.tmpl"
56617a3babSopenharmony_ci  out_file = "${target_gen_dir}/include/glslang/build_info.h"
57617a3babSopenharmony_ci
58617a3babSopenharmony_ci  inputs = [
59617a3babSopenharmony_ci    changes_file,
60617a3babSopenharmony_ci    script,
61617a3babSopenharmony_ci    template_file,
62617a3babSopenharmony_ci  ]
63617a3babSopenharmony_ci  outputs = [ out_file ]
64617a3babSopenharmony_ci  args = [
65617a3babSopenharmony_ci    rebase_path(src_dir, root_build_dir),
66617a3babSopenharmony_ci    "-i",
67617a3babSopenharmony_ci    rebase_path(template_file, root_build_dir),
68617a3babSopenharmony_ci    "-o",
69617a3babSopenharmony_ci    rebase_path(out_file, root_build_dir),
70617a3babSopenharmony_ci  ]
71617a3babSopenharmony_ci}
72617a3babSopenharmony_ci
73617a3babSopenharmony_ciaction("glslang_extension_headers") {
74617a3babSopenharmony_ci  script = "gen_extension_headers.py"
75617a3babSopenharmony_ci
76617a3babSopenharmony_ci  out_file = "${target_gen_dir}/include/glslang/glsl_intrinsic_header.h"
77617a3babSopenharmony_ci
78617a3babSopenharmony_ci  # Fuchsia GN build rules require all GN actions to be hermetic and they
79617a3babSopenharmony_ci  # should correctly and fully state their inputs and outpus (see
80617a3babSopenharmony_ci  # https://fuchsia.dev/fuchsia-src/development/build/hermetic_actions
81617a3babSopenharmony_ci  # for details). All input files of the script should be added to the
82617a3babSopenharmony_ci  # |sources| list.
83617a3babSopenharmony_ci  sources = [ "glslang/ExtensionHeaders/GL_EXT_shader_realtime_clock.glsl" ]
84617a3babSopenharmony_ci
85617a3babSopenharmony_ci  inputs = [ script ]
86617a3babSopenharmony_ci  outputs = [ out_file ]
87617a3babSopenharmony_ci  args = [
88617a3babSopenharmony_ci    "-i",
89617a3babSopenharmony_ci    rebase_path("glslang/ExtensionHeaders", root_build_dir),
90617a3babSopenharmony_ci    "-o",
91617a3babSopenharmony_ci    rebase_path(out_file, root_build_dir),
92617a3babSopenharmony_ci  ]
93617a3babSopenharmony_ci}
94617a3babSopenharmony_ci
95617a3babSopenharmony_cispirv_tools_dir = glslang_spirv_tools_dir
96617a3babSopenharmony_ci
97617a3babSopenharmony_ciconfig("glslang_public") {
98617a3babSopenharmony_ci  include_dirs = [ "." ]
99617a3babSopenharmony_ci  if (!is_win || is_clang) {
100617a3babSopenharmony_ci    cflags = [ "-Wno-conversion" ]
101617a3babSopenharmony_ci  }
102617a3babSopenharmony_ci}
103617a3babSopenharmony_ci
104617a3babSopenharmony_ciconfig("glslang_hlsl") {
105617a3babSopenharmony_ci  defines = [ "ENABLE_HLSL=1" ]
106617a3babSopenharmony_ci}
107617a3babSopenharmony_ci
108617a3babSopenharmony_citemplate("glslang_sources_common") {
109617a3babSopenharmony_ci  source_set(target_name) {
110617a3babSopenharmony_ci    public_configs = [ ":glslang_public" ]
111617a3babSopenharmony_ci
112617a3babSopenharmony_ci    if (invoker.enable_hlsl) {
113617a3babSopenharmony_ci      public_configs += [ ":glslang_hlsl" ]
114617a3babSopenharmony_ci    }
115617a3babSopenharmony_ci
116617a3babSopenharmony_ci    sources = [
117617a3babSopenharmony_ci      "SPIRV/GLSL.ext.AMD.h",
118617a3babSopenharmony_ci      "SPIRV/GLSL.ext.ARM.h",
119617a3babSopenharmony_ci      "SPIRV/GLSL.ext.EXT.h",
120617a3babSopenharmony_ci      "SPIRV/GLSL.ext.KHR.h",
121617a3babSopenharmony_ci      "SPIRV/GLSL.ext.NV.h",
122617a3babSopenharmony_ci      "SPIRV/GLSL.ext.QCOM.h",
123617a3babSopenharmony_ci      "SPIRV/GLSL.std.450.h",
124617a3babSopenharmony_ci      "SPIRV/GlslangToSpv.cpp",
125617a3babSopenharmony_ci      "SPIRV/GlslangToSpv.h",
126617a3babSopenharmony_ci      "SPIRV/InReadableOrder.cpp",
127617a3babSopenharmony_ci      "SPIRV/Logger.cpp",
128617a3babSopenharmony_ci      "SPIRV/Logger.h",
129617a3babSopenharmony_ci      "SPIRV/NonSemanticDebugPrintf.h",
130617a3babSopenharmony_ci      "SPIRV/NonSemanticShaderDebugInfo100.h",
131617a3babSopenharmony_ci      "SPIRV/SPVRemapper.cpp",
132617a3babSopenharmony_ci      "SPIRV/SPVRemapper.h",
133617a3babSopenharmony_ci      "SPIRV/SpvBuilder.cpp",
134617a3babSopenharmony_ci      "SPIRV/SpvBuilder.h",
135617a3babSopenharmony_ci      "SPIRV/SpvPostProcess.cpp",
136617a3babSopenharmony_ci      "SPIRV/SpvTools.h",
137617a3babSopenharmony_ci      "SPIRV/bitutils.h",
138617a3babSopenharmony_ci      "SPIRV/disassemble.cpp",
139617a3babSopenharmony_ci      "SPIRV/disassemble.h",
140617a3babSopenharmony_ci      "SPIRV/doc.cpp",
141617a3babSopenharmony_ci      "SPIRV/doc.h",
142617a3babSopenharmony_ci      "SPIRV/hex_float.h",
143617a3babSopenharmony_ci      "SPIRV/spirv.hpp",
144617a3babSopenharmony_ci      "SPIRV/spvIR.h",
145617a3babSopenharmony_ci      "glslang/GenericCodeGen/CodeGen.cpp",
146617a3babSopenharmony_ci      "glslang/GenericCodeGen/Link.cpp",
147617a3babSopenharmony_ci      "glslang/Include/BaseTypes.h",
148617a3babSopenharmony_ci      "glslang/Include/Common.h",
149617a3babSopenharmony_ci      "glslang/Include/ConstantUnion.h",
150617a3babSopenharmony_ci      "glslang/Include/InfoSink.h",
151617a3babSopenharmony_ci      "glslang/Include/InitializeGlobals.h",
152617a3babSopenharmony_ci      "glslang/Include/PoolAlloc.h",
153617a3babSopenharmony_ci      "glslang/Include/ResourceLimits.h",
154617a3babSopenharmony_ci      "glslang/Include/ShHandle.h",
155617a3babSopenharmony_ci      "glslang/Include/SpirvIntrinsics.h",
156617a3babSopenharmony_ci      "glslang/Include/Types.h",
157617a3babSopenharmony_ci      "glslang/Include/arrays.h",
158617a3babSopenharmony_ci      "glslang/Include/intermediate.h",
159617a3babSopenharmony_ci      "glslang/MachineIndependent/Constant.cpp",
160617a3babSopenharmony_ci      "glslang/MachineIndependent/InfoSink.cpp",
161617a3babSopenharmony_ci      "glslang/MachineIndependent/Initialize.cpp",
162617a3babSopenharmony_ci      "glslang/MachineIndependent/Initialize.h",
163617a3babSopenharmony_ci      "glslang/MachineIndependent/IntermTraverse.cpp",
164617a3babSopenharmony_ci      "glslang/MachineIndependent/Intermediate.cpp",
165617a3babSopenharmony_ci      "glslang/MachineIndependent/LiveTraverser.h",
166617a3babSopenharmony_ci      "glslang/MachineIndependent/ParseContextBase.cpp",
167617a3babSopenharmony_ci      "glslang/MachineIndependent/ParseHelper.cpp",
168617a3babSopenharmony_ci      "glslang/MachineIndependent/ParseHelper.h",
169617a3babSopenharmony_ci      "glslang/MachineIndependent/PoolAlloc.cpp",
170617a3babSopenharmony_ci      "glslang/MachineIndependent/RemoveTree.cpp",
171617a3babSopenharmony_ci      "glslang/MachineIndependent/RemoveTree.h",
172617a3babSopenharmony_ci      "glslang/MachineIndependent/Scan.cpp",
173617a3babSopenharmony_ci      "glslang/MachineIndependent/Scan.h",
174617a3babSopenharmony_ci      "glslang/MachineIndependent/ScanContext.h",
175617a3babSopenharmony_ci      "glslang/MachineIndependent/ShaderLang.cpp",
176617a3babSopenharmony_ci      "glslang/MachineIndependent/SpirvIntrinsics.cpp",
177617a3babSopenharmony_ci      "glslang/MachineIndependent/SymbolTable.cpp",
178617a3babSopenharmony_ci      "glslang/MachineIndependent/SymbolTable.h",
179617a3babSopenharmony_ci      "glslang/MachineIndependent/Versions.cpp",
180617a3babSopenharmony_ci      "glslang/MachineIndependent/Versions.h",
181617a3babSopenharmony_ci      "glslang/MachineIndependent/attribute.cpp",
182617a3babSopenharmony_ci      "glslang/MachineIndependent/attribute.h",
183617a3babSopenharmony_ci      "glslang/MachineIndependent/gl_types.h",
184617a3babSopenharmony_ci      "glslang/MachineIndependent/glslang_tab.cpp",
185617a3babSopenharmony_ci      "glslang/MachineIndependent/glslang_tab.cpp.h",
186617a3babSopenharmony_ci      "glslang/MachineIndependent/intermOut.cpp",
187617a3babSopenharmony_ci      "glslang/MachineIndependent/iomapper.cpp",
188617a3babSopenharmony_ci      "glslang/MachineIndependent/iomapper.h",
189617a3babSopenharmony_ci      "glslang/MachineIndependent/limits.cpp",
190617a3babSopenharmony_ci      "glslang/MachineIndependent/linkValidate.cpp",
191617a3babSopenharmony_ci      "glslang/MachineIndependent/localintermediate.h",
192617a3babSopenharmony_ci      "glslang/MachineIndependent/parseConst.cpp",
193617a3babSopenharmony_ci      "glslang/MachineIndependent/parseVersions.h",
194617a3babSopenharmony_ci      "glslang/MachineIndependent/preprocessor/Pp.cpp",
195617a3babSopenharmony_ci      "glslang/MachineIndependent/preprocessor/PpAtom.cpp",
196617a3babSopenharmony_ci      "glslang/MachineIndependent/preprocessor/PpContext.cpp",
197617a3babSopenharmony_ci      "glslang/MachineIndependent/preprocessor/PpContext.h",
198617a3babSopenharmony_ci      "glslang/MachineIndependent/preprocessor/PpScanner.cpp",
199617a3babSopenharmony_ci      "glslang/MachineIndependent/preprocessor/PpTokens.cpp",
200617a3babSopenharmony_ci      "glslang/MachineIndependent/preprocessor/PpTokens.h",
201617a3babSopenharmony_ci      "glslang/MachineIndependent/propagateNoContraction.cpp",
202617a3babSopenharmony_ci      "glslang/MachineIndependent/propagateNoContraction.h",
203617a3babSopenharmony_ci      "glslang/MachineIndependent/reflection.cpp",
204617a3babSopenharmony_ci      "glslang/MachineIndependent/reflection.h",
205617a3babSopenharmony_ci      "glslang/OSDependent/osinclude.h",
206617a3babSopenharmony_ci      "glslang/Public/ShaderLang.h",
207617a3babSopenharmony_ci    ]
208617a3babSopenharmony_ci
209617a3babSopenharmony_ci    # Workaround gn issue complaining about these not being allowed even though GLSLANG_HLSL is not
210617a3babSopenharmony_ci    # defined.
211617a3babSopenharmony_ci    sources += [
212617a3babSopenharmony_ci      "glslang/HLSL/hlslParseHelper.h",
213617a3babSopenharmony_ci      "glslang/HLSL/hlslParseables.h",
214617a3babSopenharmony_ci      "glslang/HLSL/hlslScanContext.h",
215617a3babSopenharmony_ci      "glslang/HLSL/hlslTokens.h",
216617a3babSopenharmony_ci    ]
217617a3babSopenharmony_ci
218617a3babSopenharmony_ci    if (invoker.enable_hlsl) {
219617a3babSopenharmony_ci      sources += [
220617a3babSopenharmony_ci        "glslang/HLSL/hlslAttributes.cpp",
221617a3babSopenharmony_ci        "glslang/HLSL/hlslAttributes.h",
222617a3babSopenharmony_ci        "glslang/HLSL/hlslGrammar.cpp",
223617a3babSopenharmony_ci        "glslang/HLSL/hlslGrammar.h",
224617a3babSopenharmony_ci        "glslang/HLSL/hlslOpMap.cpp",
225617a3babSopenharmony_ci        "glslang/HLSL/hlslOpMap.h",
226617a3babSopenharmony_ci        "glslang/HLSL/hlslParseHelper.cpp",
227617a3babSopenharmony_ci        "glslang/HLSL/hlslParseables.cpp",
228617a3babSopenharmony_ci        "glslang/HLSL/hlslScanContext.cpp",
229617a3babSopenharmony_ci        "glslang/HLSL/hlslTokenStream.cpp",
230617a3babSopenharmony_ci        "glslang/HLSL/hlslTokenStream.h",
231617a3babSopenharmony_ci      ]
232617a3babSopenharmony_ci    }
233617a3babSopenharmony_ci
234617a3babSopenharmony_ci    defines = []
235617a3babSopenharmony_ci    if (invoker.enable_opt) {
236617a3babSopenharmony_ci      sources += [ "SPIRV/SpvTools.cpp" ]
237617a3babSopenharmony_ci      defines += [ "ENABLE_OPT=1" ]
238617a3babSopenharmony_ci    }
239617a3babSopenharmony_ci
240617a3babSopenharmony_ci    if (is_win) {
241617a3babSopenharmony_ci      sources += [ "glslang/OSDependent/Windows/ossource.cpp" ]
242617a3babSopenharmony_ci      defines += [ "GLSLANG_OSINCLUDE_WIN32" ]
243617a3babSopenharmony_ci    } else {
244617a3babSopenharmony_ci      sources += [ "glslang/OSDependent/Unix/ossource.cpp" ]
245617a3babSopenharmony_ci      defines += [ "GLSLANG_OSINCLUDE_UNIX" ]
246617a3babSopenharmony_ci    }
247617a3babSopenharmony_ci
248617a3babSopenharmony_ci    if (is_clang) {
249617a3babSopenharmony_ci      cflags = [
250617a3babSopenharmony_ci        "-Wno-extra-semi",
251617a3babSopenharmony_ci        "-Wno-ignored-qualifiers",
252617a3babSopenharmony_ci        "-Wno-implicit-fallthrough",
253617a3babSopenharmony_ci        "-Wno-inconsistent-missing-override",
254617a3babSopenharmony_ci        "-Wno-missing-field-initializers",
255617a3babSopenharmony_ci        "-Wno-newline-eof",
256617a3babSopenharmony_ci        "-Wno-sign-compare",
257617a3babSopenharmony_ci        "-Wno-suggest-destructor-override",
258617a3babSopenharmony_ci        "-Wno-suggest-override",
259617a3babSopenharmony_ci        "-Wno-unused-variable",
260617a3babSopenharmony_ci      ]
261617a3babSopenharmony_ci    }
262617a3babSopenharmony_ci    if (is_win && !is_clang) {
263617a3babSopenharmony_ci      cflags = [
264617a3babSopenharmony_ci        "/wd4018",  # signed/unsigned mismatch
265617a3babSopenharmony_ci        "/wd4189",  # local variable is initialized but not referenced
266617a3babSopenharmony_ci      ]
267617a3babSopenharmony_ci    }
268617a3babSopenharmony_ci
269617a3babSopenharmony_ci    include_dirs = [ "${target_gen_dir}/include" ]
270617a3babSopenharmony_ci
271617a3babSopenharmony_ci    deps = [ ":glslang_build_info" ]
272617a3babSopenharmony_ci
273617a3babSopenharmony_ci    if (invoker.enable_opt) {
274617a3babSopenharmony_ci      deps += [
275617a3babSopenharmony_ci        "${spirv_tools_dir}:spvtools_opt",
276617a3babSopenharmony_ci        "${spirv_tools_dir}:spvtools_val",
277617a3babSopenharmony_ci      ]
278617a3babSopenharmony_ci      include_dirs += [ "${spirv_tools_dir}/include" ]
279617a3babSopenharmony_ci    }
280617a3babSopenharmony_ci    if (build_ohos_sdk) {
281617a3babSopenharmony_ci      defines += [ "OH_SDK" ]
282617a3babSopenharmony_ci      cflags += [ "-std=c++17" ]
283617a3babSopenharmony_ci    } else {
284617a3babSopenharmony_ci      configs -= _configs_to_remove
285617a3babSopenharmony_ci      configs += _configs_to_add
286617a3babSopenharmony_ci    }
287617a3babSopenharmony_ci  }
288617a3babSopenharmony_ci}
289617a3babSopenharmony_ci
290617a3babSopenharmony_ciglslang_sources_common("glslang_lib_sources") {
291617a3babSopenharmony_ci  enable_opt = false
292617a3babSopenharmony_ci  enable_hlsl = true
293617a3babSopenharmony_ci}
294617a3babSopenharmony_ci
295617a3babSopenharmony_ciglslang_sources_common("glslang_sources") {
296617a3babSopenharmony_ci  enable_opt = false
297617a3babSopenharmony_ci  enable_hlsl = true
298617a3babSopenharmony_ci}
299617a3babSopenharmony_ci
300617a3babSopenharmony_cisource_set("glslang_default_resource_limits_sources") {
301617a3babSopenharmony_ci  sources = [
302617a3babSopenharmony_ci    "glslang/Include/ResourceLimits.h",
303617a3babSopenharmony_ci    "glslang/Public/ResourceLimits.h",
304617a3babSopenharmony_ci    "glslang/ResourceLimits/ResourceLimits.cpp",
305617a3babSopenharmony_ci  ]
306617a3babSopenharmony_ci  public_configs = [ ":glslang_public" ]
307617a3babSopenharmony_ci  if (!build_ohos_sdk) {
308617a3babSopenharmony_ci    configs -= _configs_to_remove
309617a3babSopenharmony_ci    configs += _configs_to_add
310617a3babSopenharmony_ci  }
311617a3babSopenharmony_ci}
312617a3babSopenharmony_ci
313617a3babSopenharmony_ciohos_executable("glslang_validator") {
314617a3babSopenharmony_ci  sources = [
315617a3babSopenharmony_ci    "StandAlone/DirStackFileIncluder.h",
316617a3babSopenharmony_ci    "StandAlone/StandAlone.cpp",
317617a3babSopenharmony_ci  ]
318617a3babSopenharmony_ci  if (!is_win) {
319617a3babSopenharmony_ci    cflags = [
320617a3babSopenharmony_ci      "-Woverflow",
321617a3babSopenharmony_ci      "-std=c++17",
322617a3babSopenharmony_ci    ]
323617a3babSopenharmony_ci  } else {
324617a3babSopenharmony_ci    cflags = [ "-std=c++17" ]
325617a3babSopenharmony_ci  }
326617a3babSopenharmony_ci  defines = [
327617a3babSopenharmony_ci    "ENABLE_OPT=1",
328617a3babSopenharmony_ci    "OH_SDK",
329617a3babSopenharmony_ci  ]
330617a3babSopenharmony_ci  deps = [
331617a3babSopenharmony_ci    ":glslang_build_info",
332617a3babSopenharmony_ci    ":glslang_default_resource_limits_sources",
333617a3babSopenharmony_ci    ":glslang_extension_headers",
334617a3babSopenharmony_ci    ":glslang_sources",
335617a3babSopenharmony_ci  ]
336617a3babSopenharmony_ci  public_configs = [ ":glslang_hlsl" ]
337617a3babSopenharmony_ci
338617a3babSopenharmony_ci  include_dirs = [
339617a3babSopenharmony_ci    "${target_gen_dir}/include",
340617a3babSopenharmony_ci    "${spirv_tools_dir}/include",
341617a3babSopenharmony_ci  ]
342617a3babSopenharmony_ci  install_enable = true
343617a3babSopenharmony_ci  part_name = "graphic_2d"
344617a3babSopenharmony_ci  subsystem_name = "graphic"
345617a3babSopenharmony_ci}
346617a3babSopenharmony_ci
347617a3babSopenharmony_ciohos_executable("spirv-remap") {
348617a3babSopenharmony_ci  sources = [ "StandAlone/spirv-remap.cpp" ]
349617a3babSopenharmony_ci  defines = [
350617a3babSopenharmony_ci    "ENABLE_OPT=1",
351617a3babSopenharmony_ci    "OH_SDK",
352617a3babSopenharmony_ci  ]
353617a3babSopenharmony_ci  deps = [ ":glslang_sources" ]
354617a3babSopenharmony_ci  cflags = [ "-std=c++17" ]
355617a3babSopenharmony_ci  include_dirs = [ "${spirv_tools_dir}/include" ]
356617a3babSopenharmony_ci  install_enable = true
357617a3babSopenharmony_ci  part_name = "graphic_2d"
358617a3babSopenharmony_ci  subsystem_name = "graphic"
359617a3babSopenharmony_ci}
360617a3babSopenharmony_ci
361617a3babSopenharmony_cigroup("glslang") {
362617a3babSopenharmony_ci  deps = [
363617a3babSopenharmony_ci    "//third_party/glslang/SPIRV:libdeqp_spirv",
364617a3babSopenharmony_ci    "//third_party/glslang/SPIRV:libdeqp_spvremapper",
365617a3babSopenharmony_ci    "//third_party/glslang/glslang:libdeqp_glslang",
366617a3babSopenharmony_ci  ]
367617a3babSopenharmony_ci}
368