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("cameraApp") {
M
mamingshuai 已提交
17 18 19 20 21
  sources = [
    "cameraApp/src/main/cpp/camera_ability.cpp",
    "cameraApp/src/main/cpp/camera_ability_slice.cpp",
    "cameraApp/src/main/cpp/camera_manager.cpp",
  ]
22

M
mamingshuai 已提交
23 24 25
  deps = [
    "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
    "${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
P
PaDaBoo 已提交
26
    "//foundation/distributeddatamgr/appdatamgr/kv_store/frameworks/native/kv_store:kv_store",
M
mamingshuai 已提交
27 28 29 30 31 32 33
    "//foundation/distributedschedule/samgr_lite/samgr:samgr",
    "//foundation/graphic/surface",
    "//foundation/graphic/ui:lite_ui",
    "//foundation/graphic/utils:lite_graphic_utils",
    "//foundation/multimedia/camera_lite/frameworks:camera_lite",
    "//foundation/multimedia/media_lite/frameworks/recorder_lite:recorder_lite",
  ]
34

M
mamingshuai 已提交
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
  include_dirs = [
    "cameraApp/src/main/cpp",
    "${aafwk_lite_path}/interfaces/kits/ability_lite",
    "${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
    "${aafwk_lite_path}/interfaces/kits/want_lite",
    "//base/startup/syspara_lite/interfaces/kits",
    "//foundation/multimedia/camera_lite/interfaces/kits",
    "//foundation/multimedia/camera_lite/interfaces/kits",
  ]
  ldflags = [
    "-L$ohos_root_path/sysroot/usr/lib",
    "-Wl,-rpath-link=$ohos_root_path/sysroot/usr/lib",
    "-lstdc++",
    "-lcamera_lite",
    "-lsurface",
    "-lrecorder_lite",
  ]
  defines = [
    "ENABLE_WINDOW=1",
    "ABILITY_WINDOW_SUPPORT",
  ]
56 57
}

M
mamingshuai 已提交
58 59 60 61 62 63 64 65 66 67
hap_pack("cameraApp_hap") {
  deps = [ ":cameraApp" ]
  mode = "hap"
  json_path = "cameraApp/src/main/config.json"
  ability_so_path = "$root_out_dir/libcameraApp.so"
  force = "true"
  cert_profile = "cert/camera_HarmonyAppProvision_Release.p7b"
  resources_path = "cameraApp/src/main/resources"
  hap_name = "cameraApp"
  privatekey = "HOS Application Provision Release"
68
}