BUILD.gn 2.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# Copyright (c) 2020 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build/lite/config/hap_pack.gni")

shared_library("gallery") {
M
mamingshuai 已提交
17 18 19 20 21 22
  sources = [
    "src/gallery_ability.cpp",
    "src/gallery_ability_slice.cpp",
    "src/picture_ability_slice.cpp",
    "src/player_ability_slice.cpp",
  ]
23

M
mamingshuai 已提交
24 25 26 27 28 29 30 31
  include_dirs = [
    "include",
    "${aafwk_lite_path}/interfaces/kits/ability_lite",
    "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
    "${aafwk_lite_path}/interfaces/kits/want_lite",
    "//foundation/multimedia/media_lite/interfaces/kits/player_lite",
    "//base/startup/syspara_lite/interfaces/kits",
  ]
32

M
mamingshuai 已提交
33 34 35
  deps = [
    "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
    "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
P
PaDaBoo 已提交
36
    "//foundation/distributeddatamgr/appdatamgr/kv_store/frameworks/native/kv_store:kv_store",
M
mamingshuai 已提交
37 38 39 40 41 42 43
    "//foundation/distributedschedule/samgr_lite/samgr:samgr",
    "//foundation/graphic/surface",
    "//foundation/graphic/ui:lite_ui",
    "//foundation/graphic/utils:lite_graphic_utils",
    "//foundation/multimedia/media_lite/frameworks/player_lite:player_lite",
    "//foundation/multimedia/media_lite/frameworks/recorder_lite:recorder_lite",
  ]
44

M
mamingshuai 已提交
45
  ldflags = [ "-shared" ]
46

M
mamingshuai 已提交
47 48 49 50 51 52 53 54 55 56
  ldflags += [ "-lstdc++" ]
  ldflags += [ "-lpthread" ]
  ldflags += [ "-L$ohos_root_path/sysroot/usr/lib" ]
  ldflags += [ "-Wl,-rpath-link=$ohos_root_path/sysroot/usr/lib" ]
  ldflags += [
    "-lui",
    "-lsurface",
    "-lplayer_lite",
    "-lability",
  ]
57

M
mamingshuai 已提交
58 59 60 61 62
  defines = [
    "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER",
    "ENABLE_WINDOW=1",
    "ABILITY_WINDOW_SUPPORT",
  ]
63 64
}

M
mamingshuai 已提交
65 66 67 68 69 70 71 72 73 74
hap_pack("gallery_hap") {
  deps = [ ":gallery" ]
  mode = "hap"
  json_path = "config.json"
  ability_so_path = "$root_out_dir/libgallery.so"
  force = "true"
  cert_profile = "cert/gallery_HarmonyAppProvision_Release.p7b"
  resources_path = "resources"
  hap_name = "gallery"
  privatekey = "HOS Application Provision Release"
75
}