• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14# external glslang src hlsl build
15
16import("//build/ohos.gni")
17import("//third_party/vk-gl-cts/vk_gl_cts.gni")
18
19config("hlsl_config") {
20  cflags_cc = deqp_common_cflags_cc
21
22  cflags_cc -= [
23    "-frtti",
24    "-fexceptions",
25  ]
26  cflags_cc += [
27    "-fPIC",
28    "-Wno-reorder",
29    "-fno-rtti",
30    "-fno-exceptions",
31  ]
32
33  defines = deqp_common_defines
34  defines -= [
35    "DEQP_SUPPORT_DRM=0",
36    "DEQP_TARGET_NAME=\"Default\"",
37  ]
38  defines += [
39    "ENABLE_HLSL",
40    "ENABLE_OPT=0",
41    "GLSLANG_OSINCLUDE_UNIX",
42  ]
43}
44
45ohos_source_set("hlsl_source") {
46  sources = [ "//third_party/glslang/hlsl/stub.cpp" ]
47  include_dirs = [
48    "//third_party/zlib/src",
49    "//third_party/glslang/glslang/Include",
50    "//third_party/glslang/glslang/Public",
51  ]
52  include_dirs += deqp_common_include_dirs
53
54  deps = []
55  configs = [ ":hlsl_config" ]
56}
57
58ohos_shared_library("libdeqp_hlsl") {
59  deps = [ ":hlsl_source" ]
60  part_name = "graphic_standard"
61  subsystem_name = "graphic"
62}
63