# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/arkui/ace_engine/ace_config.gni") template("ace_base_source_set") { forward_variables_from(invoker, "*") ohos_source_set(target_name) { subsystem_name = ace_engine_subsystem part_name = ace_engine_part defines += invoker.defines deps = [ "base64:ace_base_base64_$platform", "i18n:ace_base_i18n_$platform", "resource:ace_resource", ] configs = [ "$ace_root:ace_config" ] # add base source file here sources = [ "geometry/animatable_dimension.cpp", "geometry/animatable_matrix4.cpp", "geometry/dimension.cpp", "geometry/least_square_impl.cpp", "geometry/matrix3.cpp", "geometry/matrix4.cpp", "geometry/quaternion.cpp", "geometry/transform_util.cpp", "image/pixel_map.cpp", "json/json_util.cpp", "log/ace_scoring_log.cpp", "log/ace_trace.cpp", "log/ace_tracker.cpp", "log/dump_log.cpp", "memory/memory_monitor.cpp", "ressched/ressched_report.cpp", "subwindow/subwindow_manager.cpp", "thread/background_task_executor.cpp", "utils/base_id.cpp", "utils/date_util.cpp", "utils/measure_util.cpp", "utils/resource_configuration.cpp", "utils/string_expression.cpp", "utils/string_utils.cpp", "utils/time_util.cpp", ] if (platform != "windows") { # add secure c API include_dirs = [ "//third_party/bounds_checking_function/include" ] if (is_cross_platform_build) { deps += [ "//third_party/bounds_checking_function:libsec_static" ] } else { deps += [ "//third_party/bounds_checking_function:libsec_shared" ] } } # curl download manager if (defined(config.use_curl_download) && config.use_curl_download) { configs += [ "//third_party/curl:curl_config" ] sources += [ "$ace_root/frameworks/base/network/download_manager.cpp" ] deps += [ "$ace_root/frameworks/base/network:cacert.pem" ] if (is_cross_platform_build) { deps += [ "//third_party/curl:curl" ] } else { deps += [ "//third_party/curl:curl_shared" ] } } if (is_cross_platform_build || platform != "ohos") { deps += [ "//third_party/cJSON:cjson_static" ] } else { deps += [ "//third_party/cJSON:cjson" ] } cflags_cc = [] cflags_cc += invoker.cflags_cc } } foreach(item, ace_platforms) { ace_base_source_set("ace_base_" + item.name) { platform = item.name defines = [] cflags_cc = [] config = { } if (defined(item.config)) { config = item.config } if (defined(config.defines)) { defines = config.defines } if (defined(config.cflags_cc)) { cflags_cc = config.cflags_cc } } }