• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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")
15import("//foundation/graphic/graphic_2d/graphic_config.gni")
16
17## Build libvsync.so
18
19config("vsync_config") {
20  visibility = [ ":*" ]
21
22  cflags = [
23    "-Wall",
24    "-Werror",
25    "-g3",
26  ]
27}
28
29config("vsync_public_config") {
30  include_dirs = [
31    "//base/notification/eventhandler/interfaces/inner_api",
32    "$graphic_2d_root/interfaces/inner_api/composer",
33    "$graphic_2d_root/rosen/include/common",
34    "$graphic_2d_root/rosen/modules/composer/vsync/include",
35    "$graphic_2d_root/utils/sandbox",
36  ]
37}
38
39ohos_shared_library("libvsync") {
40  sources = [
41    "src/vsync_connection_proxy.cpp",
42    "src/vsync_connection_stub.cpp",
43    "src/vsync_controller.cpp",
44    "src/vsync_distributor.cpp",
45    "src/vsync_generator.cpp",
46    "src/vsync_receiver.cpp",
47    "src/vsync_sampler.cpp",
48  ]
49
50  include_dirs = [
51    "$graphic_2d_root/utils/log",
52    "$graphic_2d_root/interfaces/inner_api/common",
53    "$graphic_2d_root/rosen/modules/composer/vsync/include",
54  ]
55
56  configs = [ ":vsync_config" ]
57
58  public_configs = [
59    ":vsync_public_config",
60    "//commonlibrary/c_utils/base:utils_config",
61  ]
62
63  deps = [
64    "$graphic_2d_root/utils:sandbox_utils",
65    "$graphic_2d_root/utils:socketpair",
66  ]
67
68  public_deps = [ "$graphic_2d_root/utils:scoped_bytrace" ]
69  external_deps = [
70    "c_utils:utils",
71    "eventhandler:libeventhandler",
72    "hilog:libhilog",
73    "ipc:ipc_core",
74  ]
75
76  if (defined(graphic_2d_ext_configs.vendor_root)) {
77    include_dirs += graphic_2d_ext_configs.libvsync_ext_include_dirs
78
79    sources += graphic_2d_ext_configs.libvsync_ext_sources
80
81    public_deps += [ "//foundation/graphic/graphic_2d_ext/ohcore/graphic_compat_layer:libgraphic_compat_layer" ]
82  }
83
84  innerapi_tags = [ "platformsdk" ]
85  part_name = "graphic_2d"
86  subsystem_name = "graphic"
87}
88
89## Build libvsync.so
90
91group("test") {
92  testonly = true
93
94  deps = [ "test:test" ]
95}
96