1# Copyright (c) 2021 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") 15FMS_BASE_DIR = "//foundation/filemanagement/user_file_service/services" 16 17group("fms") { 18 deps = [ 19 ":fms_server", 20 ":fms_service.cfg", 21 ] 22} 23 24ohos_prebuilt_etc("fms_service.cfg") { 25 source = "etc/fms_service.cfg" 26 relative_install_dir = "init" 27 subsystem_name = "filemanagement" 28 part_name = "user_file_service" 29} 30 31ohos_shared_library("fms_server") { 32 subsystem_name = "filemanagement" 33 part_name = "user_file_service" 34 35 include_dirs = [ 36 "$FMS_BASE_DIR/include", 37 "$FMS_BASE_DIR/src/client", 38 "$FMS_BASE_DIR/src/server", 39 "$FMS_BASE_DIR/src/fileoper", 40 "$FMS_BASE_DIR/include/fileoper", 41 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include/hilog", 42 "//foundation/filemanagement/storage_service/services/storage_manager/include", 43 "//foundation/filemanagement/storage_service/interfaces/innerkits/storage_manager/native", 44 "//foundation/aafwk/standard/interfaces/innerkits/base/include/ohos/aafwk/base", 45 ] 46 47 sources = [ 48 "src/client/file_manager_proxy.cpp", 49 "src/fileoper/ext_storage/ext_storage_subscriber.cpp", 50 "src/fileoper/ext_storage/storage_manager_inf.cpp", 51 "src/fileoper/external_storage_oper.cpp", 52 "src/fileoper/external_storage_utils.cpp", 53 "src/fileoper/file_info.cpp", 54 "src/fileoper/media_file_oper.cpp", 55 "src/fileoper/media_file_utils.cpp", 56 "src/fileoper/oper_factory.cpp", 57 "src/server/file_manager_service.cpp", 58 "src/server/file_manager_service_stub.cpp", 59 ] 60 61 deps = [ 62 "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", 63 "//foundation/aafwk/standard/frameworks/kits/ability/native:abilitykit_native", 64 "//foundation/aafwk/standard/interfaces/innerkits/base:base", 65 "//foundation/aafwk/standard/services/abilitymgr:abilityms", 66 "//foundation/distributedschedule/dmsfwk/interfaces/innerkits/uri:zuri", 67 "//foundation/filemanagement/storage_service/interfaces/innerkits/storage_manager/native:storage_manager_sa_proxy", 68 "//foundation/filemanagement/storage_service/services/storage_manager:storage_manager", 69 "//foundation/multimedia/medialibrary_standard/frameworks/innerkitsimpl/media_library:media_library", 70 "//foundation/multimedia/medialibrary_standard/frameworks/innerkitsimpl/medialibrary_data_ability:medialibrary_data_ability", 71 "//utils/native/base:utils", 72 ] 73 cflags = [] 74 if (target_cpu == "arm") { 75 cflags += [ "-DBINDER_IPC_32BIT" ] 76 } 77 external_deps = [ 78 "ability_base:want", 79 "ability_runtime:ability_manager", 80 "ability_runtime:wantagent_innerkits", 81 "access_token:libaccesstoken_sdk", 82 "ces_standard:cesfwk_innerkits", 83 "hiviewdfx_hilog_native:libhilog", 84 "ipc:ipc_core", 85 "native_appdatamgr:native_appdatafwk", 86 "native_appdatamgr:native_dataability", 87 "native_appdatamgr:native_rdb", 88 "safwk:system_ability_fwk", 89 "samgr_standard:samgr_proxy", 90 ] 91} 92