1# Copyright (c) 2024 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/test.gni") 15import("//foundation/graphic/graphic_2d/graphic_config.gni") 16 17ohos_shared_library("libdrawing_demo") { 18 sanitize = { 19 cfi = true 20 cfi_cross_dso = true 21 debug = false 22 } 23 24 sources = [ 25 "drawing_demo.cpp", 26 "test_case/draw_path_test.cpp", 27 "test_case/draw_rect_test.cpp", 28 "test_case/draw_textblob_test.cpp", 29 "test_case/test_base.cpp", 30 "test_case/test_common.cpp", 31 "test_case_factory.cpp", 32 ] 33 34 deps = [ 35 "../../../../rosen/modules/2d_graphics:2d_graphics", 36 "../../../../rosen/modules/render_service_base:librender_service_base", 37 "../../../../rosen/modules/render_service_client:librender_service_client", 38 ] 39 40 public_external_deps = [ "window_manager:libwm" ] 41 external_deps = [ 42 "access_token:libaccesstoken_sdk", 43 "c_utils:utils", 44 "hilog:libhilog", 45 "image_framework:image_native", 46 "window_manager:libdm", 47 ] 48 49 defines = [] 50 if (graphic_2d_support_access_token) { 51 external_deps += [ 52 "access_token:libnativetoken", 53 "access_token:libtoken_setproc", 54 ] 55 defines += [ "SUPPORT_ACCESS_TOKEN" ] 56 } 57 58 part_name = "graphic_2d" 59 subsystem_name = "graphic" 60} 61 62ohos_executable("drawing_demo") { 63 sanitize = { 64 cfi = true 65 cfi_cross_dso = true 66 debug = false 67 } 68 deps = [ ":libdrawing_demo" ] 69 part_name = "graphic_2d" 70 subsystem_name = "graphic" 71} 72