1# Copyright (c) 2022 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# http://www.apache.org/licenses/LICENSE-2.0
6# Unless required by applicable law or agreed to in writing, software
7# distributed under the License is distributed on an "AS IS" BASIS,
8# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9# See the License for the specific language governing permissions and
10# limitations under the License.
11
12import("//build/lite/config/subsystem/graphic/config.gni")
13import("//build/ohos.gni")
14import("//foundation/arkui/ui_lite/ui.gni")
15import("//foundation/graphic/graphic_utils_lite/utils.gni")
16
17config("graphic_public_config_ide") {
18  include_dirs = arkui_ui_lite_include_dirs
19  include_dirs += [
20    "$ARKUI_UI_LITE_PATH/frameworks",
21    "$ARKUI_UI_LITE_PATH/frameworks/dock",
22    "$ARKUI_UI_LITE_PATH/interfaces/innerkits/common",
23    "$ARKUI_UI_LITE_PATH/interfaces/innerkits/dock",
24    "$ARKUI_UI_LITE_PATH/interfaces/innerkits/font",
25    "$ARKUI_UI_LITE_PATH/interfaces/kits/animator",
26    "$ARKUI_UI_LITE_PATH/interfaces/kits/common",
27    "$ARKUI_UI_LITE_PATH/interfaces/kits/components",
28    "$ARKUI_UI_LITE_PATH/interfaces/kits/dfx",
29    "$ARKUI_UI_LITE_PATH/interfaces/kits/events",
30    "$ARKUI_UI_LITE_PATH/interfaces/kits/font",
31    "$ARKUI_UI_LITE_PATH/interfaces/kits/layout",
32    "$ARKUI_UI_LITE_PATH/interfaces/kits/themes",
33    "$ARKUI_UI_LITE_PATH/interfaces/kits/window",
34  ]
35  defines = [
36    "ENABLE_VECTOR_FONT=1",
37    "ENABLE_BITMAP_FONT=1",
38    "ENABLE_STATIC_FONT=1",
39    "ENABLE_SHAPING=0",
40    "ENABLE_ICU=1",
41    "ENABLE_MULTI_FONT=1",
42  ]
43}
44
45config("graphic_config_ide") {
46  cflags = [
47    "-Wno-deprecated-declarations",
48    "-Wno-sign-compare",
49    "-Wno-missing-braces",
50    "-Wno-mismatched-tags",
51    "-Wno-unknown-pragmas",
52  ]
53  cflags_cc = cflags
54}
55
56ohos_static_library("ui_ide") {
57  sources = arkui_ui_lite_sources
58  include_dirs = [ "//foundation/graphic/surface_lite/interfaces/kits" ]
59  deps = [
60    "//third_party/bounds_checking_function:libsec_static",
61    "//third_party/cJSON:cjson_static",
62    "//third_party/freetype:freetype_static",
63    "//third_party/harfbuzz:harfbuzz_static",
64    "//third_party/icu/icu4c/source/common:icu_font",
65    "//third_party/libjpeg-turbo:turbojpeg_static",
66    "//third_party/libpng:libpng_static",
67    "//third_party/qrcodegen:qrcodegen_static",
68  ]
69  public_deps = [ ":graphic_utils_static_ide" ]
70  public_configs = [ ":graphic_public_config_ide" ]
71  configs = [ ":graphic_config_ide" ]
72}
73
74# copy liteWearable config dir
75ohos_copy("copy_previewer_fonts_lite_full") {
76  sources = [
77    "../../tools/qt/simulator/font/SourceHanSansSC-Regular.otf",
78    "../../tools/qt/simulator/font/line_cj.brk",
79  ]
80  outputs = [ target_out_dir + "/previewer/liteWearable/config/" +
81              "/{{source_file_part}}" ]
82  module_source_dir = target_out_dir + "/previewer/liteWearable/config/"
83  module_install_name = ""
84}
85
86config("graphic_utils_public_config_ide") {
87  include_dirs = graphic_utils_include_dirs
88}
89
90ohos_static_library("graphic_utils_static_ide") {
91  sources = graphic_utils_sources
92  include_dirs = [ "$GRAPHIC_GRAPHIC_UTILS_LITE_PATH/frameworks" ]
93  public_configs = [ ":graphic_utils_public_config_ide" ]
94  deps = [ "//third_party/bounds_checking_function:libsec_static" ]
95  configs = [ ":graphic_config_ide" ]
96}
97