1e9297d28Sopenharmony_ci# Copyright (c) 2022-2023 Huawei Device Co., Ltd.
2e9297d28Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3e9297d28Sopenharmony_ci# you may not use this file except in compliance with the License.
4e9297d28Sopenharmony_ci# You may obtain a copy of the License at
5e9297d28Sopenharmony_ci#
6e9297d28Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7e9297d28Sopenharmony_ci#
8e9297d28Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9e9297d28Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10e9297d28Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11e9297d28Sopenharmony_ci# See the License for the specific language governing permissions and
12e9297d28Sopenharmony_ci# limitations under the License.
13e9297d28Sopenharmony_ci
14e9297d28Sopenharmony_ciimport("//build/ohos.gni")
15e9297d28Sopenharmony_ciimport("//foundation/graphic/graphic_2d/graphic_config.gni")
16e9297d28Sopenharmony_ci
17e9297d28Sopenharmony_ci## Build drawing_sample {{{
18e9297d28Sopenharmony_ciconfig("drawing_sample_config") {
19e9297d28Sopenharmony_ci  visibility = [ ":*" ]
20e9297d28Sopenharmony_ci
21e9297d28Sopenharmony_ci  cflags = [
22e9297d28Sopenharmony_ci    "-Wall",
23e9297d28Sopenharmony_ci    "-Werror",
24e9297d28Sopenharmony_ci    "-g3",
25e9297d28Sopenharmony_ci  ]
26e9297d28Sopenharmony_ci}
27e9297d28Sopenharmony_ci
28e9297d28Sopenharmony_ciohos_executable("drawing_sample") {
29e9297d28Sopenharmony_ci  install_enable = true
30e9297d28Sopenharmony_ci
31e9297d28Sopenharmony_ci  sources = [
32e9297d28Sopenharmony_ci    "drawing_sample.cpp",
33e9297d28Sopenharmony_ci    "include/shadow_test.h",
34e9297d28Sopenharmony_ci    "main.cpp",
35e9297d28Sopenharmony_ci    "src/bitmap_test.cpp",
36e9297d28Sopenharmony_ci    "src/camera_test.cpp",
37e9297d28Sopenharmony_ci    "src/filter_test.cpp",
38e9297d28Sopenharmony_ci    "src/image_test.cpp",
39e9297d28Sopenharmony_ci    "src/layer_context.cpp",
40e9297d28Sopenharmony_ci    "src/matrix_test.cpp",
41e9297d28Sopenharmony_ci    "src/path_effect_test.cpp",
42e9297d28Sopenharmony_ci    "src/path_test.cpp",
43e9297d28Sopenharmony_ci    "src/pen_test.cpp",
44e9297d28Sopenharmony_ci    "src/shader_test.cpp",
45e9297d28Sopenharmony_ci  ]
46e9297d28Sopenharmony_ci
47e9297d28Sopenharmony_ci  configs = [ ":drawing_sample_config" ]
48e9297d28Sopenharmony_ci
49e9297d28Sopenharmony_ci  include_dirs = [
50e9297d28Sopenharmony_ci    "$graphic_2d_root/rosen/modules/2d_graphics/include",
51e9297d28Sopenharmony_ci    "$graphic_2d_root/rosen/modules/2d_graphics/src",
52e9297d28Sopenharmony_ci    "$graphic_2d_root/rosen/samples/2d_graphics/test/include",
53e9297d28Sopenharmony_ci    "//foundation/multimedia/image_framework/interfaces/innerkits/include",
54e9297d28Sopenharmony_ci    "$graphic_2d_root/rosen/modules/composer/hdi_backend/include",
55e9297d28Sopenharmony_ci    "$graphic_2d_root/rosen/include/common",
56e9297d28Sopenharmony_ci    "$graphic_2d_root/rosen/modules/composer/vsync/include",
57e9297d28Sopenharmony_ci    "$graphic_2d_root/interfaces/inner_api/composer",
58e9297d28Sopenharmony_ci  ]
59e9297d28Sopenharmony_ci
60e9297d28Sopenharmony_ci  deps = [
61e9297d28Sopenharmony_ci    "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics",
62e9297d28Sopenharmony_ci    "$graphic_2d_root/rosen/modules/composer:libcomposer",
63e9297d28Sopenharmony_ci  ]
64e9297d28Sopenharmony_ci
65e9297d28Sopenharmony_ci  external_deps = [
66e9297d28Sopenharmony_ci    "eventhandler:libeventhandler",
67e9297d28Sopenharmony_ci    "graphic_surface:surface",
68e9297d28Sopenharmony_ci    "hilog:libhilog",
69e9297d28Sopenharmony_ci    "skia:skia_canvaskit",
70e9297d28Sopenharmony_ci  ]
71e9297d28Sopenharmony_ci
72e9297d28Sopenharmony_ci  part_name = "graphic_2d"
73e9297d28Sopenharmony_ci  subsystem_name = "graphic"
74e9297d28Sopenharmony_ci}
75e9297d28Sopenharmony_ci## Build drawing_sample }}}
76