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# 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/ohos.gni") 15import("//foundation/filemanagement/file_api/file_api.gni") 16 17config("libn_public_config") { 18 visibility = [ ":*" ] 19 20 include_dirs = [ 21 "include", 22 "include/n_async", 23 "${utils_path}/common/include", 24 ] 25} 26 27ohos_shared_library("filemgmt_libn") { 28 sources = [ 29 "src/n_async/n_async_work_callback.cpp", 30 "src/n_async/n_async_work_promise.cpp", 31 "src/n_async/n_ref.cpp", 32 "src/n_class.cpp", 33 "src/n_error.cpp", 34 "src/n_func_arg.cpp", 35 "src/n_val.cpp", 36 ] 37 38 cflags_cc = [ "-std=c++17" ] 39 if (use_mingw_win) { 40 defines = [ "WIN_PLATFORM" ] 41 } 42 if (use_mac) { 43 defines = [ "IOS_PLATFORM" ] 44 } 45 46 public_configs = [ ":libn_public_config" ] 47 48 deps = [ "${utils_path}/filemgmt_libhilog:filemgmt_libhilog" ] 49 50 external_deps = [ 51 "hilog:libhilog", 52 "napi:ace_napi", 53 ] 54 55 use_exceptions = true 56 57 subsystem_name = "filemanagement" 58 innerapi_tags = [ "platformsdk" ] 59 part_name = "file_api" 60} 61