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 "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics", 36 "$graphic_2d_root/rosen/modules/render_service_base:librender_service_base", 37 "$graphic_2d_root/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 "cJSON:cjson", 44 "c_utils:utils", 45 "eventhandler:libeventhandler", 46 "hilog:libhilog", 47 "image_framework:image_native", 48 "selinux_adapter:librestorecon", 49 "window_manager:libdm", 50 ] 51 52 defines = [] 53 if (graphic_2d_support_access_token) { 54 external_deps += [ 55 "access_token:libnativetoken", 56 "access_token:libtoken_setproc", 57 ] 58 defines += [ "SUPPORT_ACCESS_TOKEN" ] 59 } 60 61 part_name = "graphic_2d" 62 subsystem_name = "graphic" 63} 64 65ohos_executable("drawing_demo") { 66 sanitize = { 67 cfi = true 68 cfi_cross_dso = true 69 debug = false 70 } 71 deps = [ ":libdrawing_demo" ] 72 part_name = "graphic_2d" 73 subsystem_name = "graphic" 74} 75