• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Huawei Device 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
14import("//build/ohos.gni")
15
16config("cl_config") {
17  cflags = [
18    "-std=c++17",
19    "-Wno-error=implicit-fallthrough",
20    "-Wno-deprecated-declarations",
21  ]
22}
23
24config("cl_public_config") {
25  include_dirs = [
26    "./",
27    "include",
28  ]
29}
30
31ohos_shared_library("libcl") {
32  visibility = [ "*" ]
33  sources = [ "src/opencl_wrapper.cpp" ]
34  configs = [ ":cl_config" ]
35  public_configs = [ ":cl_public_config" ]
36  output_name = "opencl_wrapper"
37  output_extension = "so"
38  innerapi_tags = [ "platformsdk_indirect" ]
39  part_name = "opencl-headers"
40  subsystem_name = "thirdparty"
41}
42
43config("opencl_headers_public_config") {
44  include_dirs = [ "./" ]
45}
46
47source_set("opencl_headers") {
48  sources = [
49    "CL/cl.h",
50    "CL/cl_d3d10.h",
51    "CL/cl_d3d11.h",
52    "CL/cl_dx9_media_sharing.h",
53    "CL/cl_dx9_media_sharing_intel.h",
54    "CL/cl_egl.h",
55    "CL/cl_ext.h",
56    "CL/cl_ext_intel.h",
57    "CL/cl_function_types.h",
58    "CL/cl_gl.h",
59    "CL/cl_gl_ext.h",
60    "CL/cl_half.h",
61    "CL/cl_icd.h",
62    "CL/cl_layer.h",
63    "CL/cl_platform.h",
64    "CL/cl_va_api_media_sharing_intel.h",
65    "CL/cl_version.h",
66    "CL/opencl.h",
67  ]
68  public_configs = [ ":opencl_headers_public_config" ]
69}
70
71group("cl_tests") {
72  deps = [ "tests:tests" ]
73}
74