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 glcts build
15
16import("//build/ohos.gni")
17import("//third_party/vk-gl-cts/vk_gl_cts.gni")
18
19config("glcts_config") {
20  cflags_cc = [
21    "-Wno-conversion",
22    "-Wno-unused-function",
23  ]
24
25  cflags_cc += deqp_common_cflags_cc
26  defines = deqp_common_defines
27}
28
29ohos_source_set("glcts_source") {
30  sources = [ "//third_party/vk-gl-cts/external/openglcts/modules/glcTestPackageRegistry.cpp" ]
31  include_dirs = [
32    "//third_party/vk-gl-cts/modules/glshared",
33    "//third_party/vk-gl-cts/modules/egl",
34    "//third_party/vk-gl-cts/modules/gles2",
35    "//third_party/vk-gl-cts/modules/gles3",
36    "//third_party/vk-gl-cts/modules/gles31",
37
38    "//third_party/vk-gl-cts/external/openglcts/modules/common",
39    "//third_party/vk-gl-cts/external/openglcts/modules/gl",
40    "//third_party/vk-gl-cts/external/openglcts/modules/gles2",
41    "//third_party/vk-gl-cts/external/openglcts/modules/gles3",
42    "//third_party/vk-gl-cts/external/openglcts/modules/gles31",
43    "//third_party/vk-gl-cts/external/openglcts/modules/gles32",
44    "//third_party/vk-gl-cts/external/openglcts/modules/glesext",
45    "//third_party/vk-gl-cts/external/openglcts/modules",
46  ]
47  include_dirs += deqp_common_include_dirs
48
49  deps = [
50    "//third_party/vk-gl-cts/external/openglcts/modules/common:libdeqp_glcts-common-nocontext-package",
51    "//third_party/vk-gl-cts/external/openglcts/modules/gl:libdeqp_glcts-gl",
52    "//third_party/vk-gl-cts/external/openglcts/modules/gles2:libdeqp_glcts-es2",
53    "//third_party/vk-gl-cts/external/openglcts/modules/gles3:libdeqp_glcts-es3",
54    "//third_party/vk-gl-cts/external/openglcts/modules/gles31:libdeqp_glcts-es31",
55    "//third_party/vk-gl-cts/external/openglcts/modules/gles32:libdeqp_glcts-es32",
56    "//third_party/vk-gl-cts/external/openglcts/modules/glesext:libdeqp_glcts-esext",
57    "//third_party/vk-gl-cts/modules/egl:libdeqp-egl",
58    "//third_party/vk-gl-cts/modules/gles2:libdeqp-gles2",
59    "//third_party/vk-gl-cts/modules/gles3:libdeqp-gles3",
60    "//third_party/vk-gl-cts/modules/gles31:libdeqp-gles31",
61  ]
62
63  configs = [ ":glcts_config" ]
64}
65
66ohos_static_library("libdeqp_glcts") {
67  deps = [ ":glcts_source" ]
68  part_name = "graphic_2d"
69  subsystem_name = "graphic"
70}
71
72ohos_executable("deqp_glcts") {
73  sources = [
74    "//third_party/vk-gl-cts/external/openglcts/modules/glcTestPackageEntry.cpp",
75    "//third_party/vk-gl-cts/framework/platform/tcuMain.cpp",
76  ]
77  include_dirs = [
78    "//third_party/zlib/src",
79    "//third_party/spirv-headers/include",
80    "//third_party/amber",
81    "//third_party/renderdoc/src",
82    "//third_party/vulkancts/framework/vulkan",
83    "//third_party/vk-gl-cts/external/openglcts/include",
84    "//third_party/vk-gl-cts/external/openglcts/framework/egl/wrapper",
85    "//third_party/vk-gl-cts/external/openglcts/modules/common",
86    "//third_party/vk-gl-cts/external/openglcts/modules/gl",
87    "//third_party/vk-gl-cts/external/openglcts/modules/gles2",
88    "//third_party/vk-gl-cts/external/openglcts/modules/gles3",
89    "//third_party/vk-gl-cts/external/openglcts/modules/gles31",
90    "//third_party/vk-gl-cts/external/openglcts/modules/gles32",
91    "//third_party/vk-gl-cts/external/openglcts/modules/glesext",
92    "//third_party/vk-gl-cts/external/openglcts/modules",
93    "//third_party/vk-gl-cts/modules/glshared",
94    "//third_party/vk-gl-cts/modules/egl",
95    "//third_party/vk-gl-cts/modules/gles2",
96    "//third_party/vk-gl-cts/modules/gles3",
97    "//third_party/vk-gl-cts/modules/gles31",
98    "//third_party/vk-gl-cts/external/openglcts/modules/runner",
99    "//third_party/glslang/glslang",
100    "//third_party/vk-gl-cts/build/include",
101    "//third_party/glslang/SPIRV",
102    "//third_party/spirv-tools/include",
103    "//third_party/spirv-headers/include",
104  ]
105  include_dirs += deqp_common_include_dirs
106  deps = [
107    ":libdeqp_glcts",
108    "//third_party/libpng:libpng",
109    "//third_party/vk-gl-cts/framework/platform:libdeqp_tcutil-platform",
110  ]
111
112  configs = [ ":glcts_config" ]
113  part_name = "graphic_2d"
114  subsystem_name = "graphic"
115}
116
117ohos_executable("deqp_cts-runner") {
118  sources = [
119    "//third_party/vk-gl-cts/external/openglcts/modules/glcTestPackageEntry.cpp",
120    "//third_party/vk-gl-cts/external/openglcts/modules/runner/glcTestRunnerMain.cpp",
121  ]
122  include_dirs = [
123    "//third_party/zlib/src",
124    "//third_party/spirv-headers/include",
125    "//third_party/amber",
126    "//third_party/renderdoc/src",
127    "//third_party/vulkancts/framework/vulkan",
128    "//third_party/vk-gl-cts/external/openglcts/include",
129    "//third_party/vk-gl-cts/external/openglcts/framework/egl/wrapper",
130    "//third_party/vk-gl-cts/external/openglcts/modules/common",
131    "//third_party/vk-gl-cts/external/openglcts/modules/gl",
132    "//third_party/vk-gl-cts/external/openglcts/modules/gles2",
133    "//third_party/vk-gl-cts/external/openglcts/modules/gles3",
134    "//third_party/vk-gl-cts/external/openglcts/modules/gles31",
135    "//third_party/vk-gl-cts/external/openglcts/modules/gles32",
136    "//third_party/vk-gl-cts/external/openglcts/modules/glesext",
137    "//third_party/vk-gl-cts/external/openglcts/modules",
138    "//third_party/vk-gl-cts/modules/glshared",
139    "//third_party/vk-gl-cts/modules/egl",
140    "//third_party/vk-gl-cts/modules/gles2",
141    "//third_party/vk-gl-cts/modules/gles3",
142    "//third_party/vk-gl-cts/modules/gles31",
143    "//third_party/vk-gl-cts/external/openglcts/modules/runner",
144    "//third_party/glslang/glslang",
145    "//third_party/vk-gl-cts/build/include",
146    "//third_party/glslang/SPIRV",
147    "//third_party/spirv-tools/include",
148    "//third_party/spirv-headers/include",
149  ]
150  include_dirs += deqp_common_include_dirs
151
152  deps = [
153    ":libdeqp_glcts",
154    "//third_party/vk-gl-cts/external/openglcts/modules/runner:libdeqp_glcts-runner",
155    "//third_party/vk-gl-cts/framework/platform:libdeqp_tcutil-platform",
156    "//third_party/vk-gl-cts/modules/glshared:libdeqp-gl-shared",
157  ]
158
159  configs = [ ":glcts_config" ]
160  part_name = "graphic_2d"
161  subsystem_name = "graphic"
162}
163