1# Copyright (C) 2023 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("//base/hiviewdfx/hitrace/hitrace.gni")
15import("//build/config/ohos/config.gni")
16import("//build/ohos.gni")
17import("//foundation/arkui/napi/napi.gni")
18import(
19    "//foundation/multimedia/camera_framework/multimedia_camera_framework.gni")
20
21MEDIA_ROOT_DIR = "//foundation/multimedia/camera_framework/"
22config("config") {
23  visibility = [ ":*" ]
24  cflags = [
25    "-Wall",
26    "-Werror",
27    "-g3",
28    "-Wunused-variable",
29  ]
30}
31
32ohos_shared_library("entry") {
33  sources = [
34    "./camera_manager.cpp",
35    "./main.cpp",
36  ]
37  if (!(product_name == "m40")) {
38    if (target_cpu == "arm") {
39      libs = [ "${clang_base_path}/../libcxx-ndk/lib/arm-linux-ohos/c++/libc++_shared.so" ]
40    } else if (target_cpu == "arm64") {
41      libs = [ "${clang_base_path}/../libcxx-ndk/lib/aarch64-linux-ohos/c++/libc++_shared.so" ]
42    } else {
43      libs = []
44    }
45  }
46  include_dirs = [
47    "$MEDIA_ROOT_DIR/interfaces/kits/native/include/camera",
48    "${multimedia_image_framework_path}/interfaces/kits/native/include",
49    "${multimedia_image_framework_path}/interfaces/kits/native/include/image",
50    "${multimedia_media_library_path}/interfaces/kits/c",
51  ]
52  external_deps = [
53    "graphic_surface:surface",
54    "hilog:hilog_ndk",
55    "napi:ace_napi",
56    "resource_management:librawfile",
57  ]
58  deps = [ "$MEDIA_ROOT_DIR/frameworks/native/ndk:ohcamera" ]
59  configs = [ ":config" ]
60  output_extension = "so"
61  part_name = "camera_framework"
62  subsystem_name = "multimedia"
63}
64