# Copyright (c) 2021 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") ############################################################################### config("utils_config") { visibility = [ ":*" ] include_dirs = [ "include", "//developtools/liblog", ] cflags = [] if (current_os == "mingw") { cflags += [ "-Wno-error=inconsistent-dllimport" ] } } config("private_securec_config") { cflags = [ "-Wno-implicit-fallthrough" ] } config("static_utils_config") { visibility = [ ":*" ] include_dirs = [ "include", "//developtools/liblog", ] } config("utils_all_dependent_configs") { include_dirs = [ "include" ] } sources_utils = [ "src/string_ex.cpp", "src/unicode_ex.cpp", "src/directory_ex.cpp", "src/datetime_ex.cpp", "src/refbase.cpp", "src/parcel.cpp", "src/semaphore_ex.cpp", "src/thread_pool.cpp", "src/file_ex.cpp", "src/observer.cpp", "src/thread_ex.cpp", "src/event_demultiplexer.cpp", "src/event_handler.cpp", "src/event_reactor.cpp", "src/timer.cpp", "src/timer_event_handler.cpp", "src/ashmem.cpp", "src/rwlock.cpp", ] ohos_static_library("utilsbase") { sources = sources_utils all_dependent_configs = [ ":utils_all_dependent_configs" ] if (current_os != "android" && current_os != "ios") { defines = [ "CONFIG_HILOG" ] } external_deps = [ "hilog_native:libhilog_base" ] public_deps = [ "//third_party/bounds_checking_function:libsec_static" ] subsystem_name = "commonlibrary" part_name = "c_utils" } ohos_static_library("utilsbase_rtti") { visibility = [ "//foundation/multimedia/histreamer/engine/plugin/plugins/source/video_capture:std_video_capture" ] sources = sources_utils all_dependent_configs = [ ":utils_all_dependent_configs" ] if (current_os != "android" && current_os != "ios") { defines = [ "CONFIG_HILOG" ] } external_deps = [ "hilog_native:libhilog_base" ] public_deps = [ "//third_party/bounds_checking_function:libsec_static" ] remove_configs = [ "//build/config/compiler:no_rtti" ] cflags = [ "-frtti" ] subsystem_name = "commonlibrary" part_name = "c_utils" } ohos_shared_library("utils") { sources = sources_utils all_dependent_configs = [ ":utils_all_dependent_configs" ] if (current_os != "android" && current_os != "ios") { defines = [ "CONFIG_HILOG" ] } external_deps = [ "hilog_native:libhilog_base" ] public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] subsystem_name = "commonlibrary" part_name = "c_utils" install_images = [ "system", "updater", ] } ###############################################################################