• 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/multimedia/media_library/media_library.gni")
16
17group("media_library_packages") {
18  deps = [ ":media_library" ]
19}
20
21config("media_library_config") {
22  visibility = [ ":*" ]
23}
24
25ohos_shared_library("media_library") {
26  install_enable = true
27
28  include_dirs = [
29    "${MEDIALIB_INNERKITS_PATH}/media_library_helper/include",
30    "${MEDIALIB_INTERFACES_PATH}/inner_api/media_library_helper/include",
31    "${MEDIALIB_UTILS_PATH}/include",
32    "${MEDIALIB_UTILS_PATH}/include",
33    "//third_party/json/include",
34  ]
35
36  sources = [
37    "src/album_asset.cpp",
38    "src/base_column.cpp",
39    "src/dir_asset.cpp",
40    "src/fetch_result.cpp",
41    "src/file_asset.cpp",
42    "src/media_column.cpp",
43    "src/media_file_uri.cpp",
44    "src/media_file_utils.cpp",
45    "src/media_volume.cpp",
46    "src/medialibrary_helper_container.cpp",
47    "src/mimetype_utils.cpp",
48    "src/native_album_asset.cpp",
49    "src/photo_album.cpp",
50    "src/photo_album_column.cpp",
51    "src/photo_map_column.cpp",
52    "src/smart_album_asset.cpp",
53  ]
54
55  configs = [ ":media_library_config" ]
56  cflags = [
57    "-Wall",
58    "-Werror",
59    "-Wno-unused-but-set-variable",
60  ]
61
62  external_deps = [
63    "ability_base:zuri",
64    "ability_runtime:abilitykit_native",
65    "c_utils:utils",
66    "common_event_service:cesfwk_innerkits",
67    "data_share:datashare_common",
68    "data_share:datashare_consumer",
69    "hilog:libhilog",
70    "hitrace:hitrace_meter",
71    "relational_store:native_rdb",
72  ]
73
74  defines = []
75  defines += [ "MEDIALIBRARY_COMPATIBILITY=1" ]
76
77  sanitize = {
78    cfi = true
79    cfi_cross_dso = true
80    debug = false
81  }
82
83  innerapi_tags = [ "platformsdk" ]
84  part_name = "media_library"
85  subsystem_name = "multimedia"
86}
87