• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020 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/lite/config/hap_pack.gni")
15
16shared_library("gallery") {
17  sources = [
18    "src/gallery_ability.cpp",
19    "src/gallery_ability_slice.cpp",
20    "src/picture_ability_slice.cpp",
21    "src/player_ability_slice.cpp",
22  ]
23
24  include_dirs = [
25    "include",
26    "${aafwk_lite_path}/interfaces/kits/ability_lite",
27    "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
28    "${aafwk_lite_path}/interfaces/kits/want_lite",
29    "//foundation/multimedia/media_lite/interfaces/kits/player_lite",
30  ]
31
32  deps = [
33    "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
34    "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
35    "//foundation/arkui/ui_lite:ui_lite",
36    "//foundation/distributeddatamgr/kv_store/interfaces/inner_api/kv_store:kv_store",
37    "//foundation/graphic/graphic_utils_lite:utils_lite",
38    "//foundation/graphic/surface_lite",
39    "//foundation/multimedia/media_lite/frameworks/player_lite:player_lite",
40    "//foundation/multimedia/media_lite/frameworks/recorder_lite:recorder_lite",
41    "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
42  ]
43
44  ldflags = [ "-shared" ]
45
46  ldflags += [ "-lstdc++" ]
47  ldflags += [ "-lpthread" ]
48  ldflags += [ "-L$ohos_root_path/sysroot/usr/lib" ]
49  ldflags += [ "-Wl,-rpath-link=$ohos_root_path/sysroot/usr/lib" ]
50  ldflags += [
51    "-lui",
52    "-lsurface",
53    "-lplayer_lite",
54    "-lability",
55  ]
56
57  defines = [
58    "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER",
59    "ENABLE_WINDOW=1",
60    "ABILITY_WINDOW_SUPPORT",
61  ]
62}
63
64hap_pack("gallery_hap") {
65  deps = [ ":gallery" ]
66  mode = "hap"
67  json_path = "config.json"
68  ability_so_path = "$root_out_dir/libgallery.so"
69  force = "true"
70  cert_profile = "cert/gallery_AppProvision_Release.p7b"
71  resources_path = "resources"
72  hap_name = "gallery"
73  privatekey = "HOS Application Provision Release"
74}
75