• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-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/distributeddatamgr/data_share/datashare.gni")
16import("//foundation/distributeddatamgr/relational_store/relational_store.gni")
17import("//foundation/multimedia/media_library/media_library.gni")
18
19group("media_library_packages") {
20  deps = [ ":media_library" ]
21}
22
23config("media_library_config") {
24  visibility = [ ":*" ]
25
26  include_dirs = [
27    "./",
28    "./include",
29    "//foundation/multimedia/media_library/interfaces/inner_api/media_library_helper/include",
30    "//foundation/multimedia/media_library/frameworks/utils/include",
31    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
32    "//commonlibrary/c_utils/base/include",
33    "${ABILITY_RUNTIME_PATH}/interfaces/kits/native/ability/native",
34    "${relational_store_innerapi_path}/rdb/include",
35    "${relational_store_innerapi_path}/appdatafwk/include",
36    "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
37    "${ABILITY_RUNTIME_PATH}/interfaces/kits/native/ability/native",
38    "${datashare_common_native_path}/include",
39    "${datashare_innerapi_path}/common/include",
40    "${datashare_innerapi_path}/consumer/include",
41    "${datashare_innerapi_path}/provider/include",
42    "${MEDIA_LIB_COMMON_UTILS_DIR}/include",
43  ]
44
45  cflags = [
46    "-Wall",
47    "-Werror",
48  ]
49}
50
51ohos_source_set("media_library_source") {
52  sources = [
53    "src/album_asset.cpp",
54    "src/dir_asset.cpp",
55    "src/fetch_result.cpp",
56    "src/file_asset.cpp",
57    "src/media_file_utils.cpp",
58    "src/media_volume.cpp",
59    "src/native_album_asset.cpp",
60    "src/smart_album_asset.cpp",
61  ]
62
63  configs = [ ":media_library_config" ]
64
65  external_deps = [ "hitrace_native:hitrace_meter" ]
66
67  part_name = "media_library"
68  subsystem_name = "multimedia"
69}
70
71ohos_shared_library("media_library") {
72  install_enable = true
73
74  deps = [ ":media_library_source" ]
75
76  external_deps = [
77    "c_utils:utils",
78    "hitrace_native:hitrace_meter",
79    "hiviewdfx_hilog_native:libhilog",
80  ]
81
82  sanitize = {
83    cfi = true
84    debug = false
85  }
86
87  part_name = "media_library"
88  subsystem_name = "multimedia"
89}
90