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 "//foundation/graphic/graphic_2d/interfaces/inner_api/composer", 33 "//foundation/graphic/graphic_2d/rosen/include/common", 34 "//foundation/graphic/graphic_2d/rosen/modules/composer/vsync/include", 35 "//foundation/graphic/graphic_2d/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 "//foundation/graphic/graphic_2d/utils/log", 52 "//foundation/graphic/graphic_2d/interfaces/inner_api/common", 53 "//foundation/graphic/graphic_2d/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 "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", 65 "//foundation/graphic/graphic_2d/utils:sandbox_utils", 66 "//foundation/graphic/graphic_2d/utils:socketpair", 67 ] 68 69 public_deps = [ 70 "//commonlibrary/c_utils/base:utils", 71 "//foundation/graphic/graphic_2d/utils:scoped_bytrace", 72 ] 73 external_deps = [ 74 "eventhandler:libeventhandler", 75 "hilog_native:libhilog", 76 ] 77 78 if (defined(graphic_2d_ext_configs.vendor_root)) { 79 include_dirs += graphic_2d_ext_configs.libvsync_ext_include_dirs 80 81 sources += graphic_2d_ext_configs.libvsync_ext_sources 82 83 public_deps += [ "//foundation/graphic/graphic_2d_ext/ohcore/graphic_compat_layer:libgraphic_compat_layer" ] 84 } 85 86 part_name = "graphic_standard" 87 subsystem_name = "graphic" 88} 89 90## Build libvsync.so 91 92group("test") { 93 testonly = true 94 95 deps = [ "test:test" ] 96} 97