• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 Huawei Device Co., Ltd.
2
3if (defined(ohos_lite)) {  # is on lite Os for ipcamera
4  import("//build/lite/config/component/lite_component.gni")
5
6  config("libexif_config") {
7    include_dirs = [
8      "//third_party/libexif",
9      "//third_party/libexif/libexif",
10      "//third_party/libexif/libexif/pentax",
11      "//third_party/libexif/libexif/olympus",
12      "//third_party/libexif/libexif/apple",
13      "//third_party/libexif/libexif/canon",
14      "//third_party/libexif/libexif/fuji",
15      "//third_party/libexif/libexif/apple",
16      "//third_party/libexif/contrib/watcom",
17      "//third_party/libexif/libexif/huawei",
18    ]
19
20    libexif_source = [
21      "//third_party/libexif/libexif/exif-byte-order.c",
22      "//third_party/libexif/libexif/exif-content.c",
23      "//third_party/libexif/libexif/exif-data.c",
24      "//third_party/libexif/libexif/exif-entry.c",
25      "//third_party/libexif/libexif/exif-format.c",
26      "//third_party/libexif/libexif/exif-gps-ifd.c",
27      "//third_party/libexif/libexif/exif-ifd.c",
28      "//third_party/libexif/libexif/exif-loader.c",
29      "//third_party/libexif/libexif/exif-log.c",
30      "//third_party/libexif/libexif/exif-mem.c",
31      "//third_party/libexif/libexif/exif-mnote-data.c",
32      "//third_party/libexif/libexif/exif-tag.c",
33      "//third_party/libexif/libexif/exif-utils.c",
34      "//third_party/libexif/libexif/pentax/exif-mnote-data-pentax.c",
35      "//third_party/libexif/libexif/pentax/mnote-pentax-entry.c",
36      "//third_party/libexif/libexif/pentax/mnote-pentax-tag.c",
37      "//third_party/libexif/libexif/olympus/exif-mnote-data-olympus.c",
38      "//third_party/libexif/libexif/olympus/mnote-olympus-entry.c",
39      "//third_party/libexif/libexif/olympus/mnote-olympus-tag.c",
40      "//third_party/libexif/libexif/fuji/exif-mnote-data-fuji.c",
41      "//third_party/libexif/libexif/fuji/mnote-fuji-entry.c",
42      "//third_party/libexif/libexif/fuji/mnote-fuji-tag.c",
43      "//third_party/libexif/libexif/apple/exif-mnote-data-apple.c",
44      "//third_party/libexif/libexif/apple/mnote-apple-entry.c",
45      "//third_party/libexif/libexif/apple/mnote-apple-tag.c",
46      "//third_party/libexif/libexif/canon/exif-mnote-data-canon.c",
47      "//third_party/libexif/libexif/canon/mnote-canon-entry.c",
48      "//third_party/libexif/libexif/canon/mnote-canon-tag.c",
49      "//third_party/libexif/libexif/apple/exif-mnote-data-apple.c",
50      "//third_party/libexif/libexif/apple/mnote-apple-entry.c",
51      "//third_party/libexif/libexif/apple/mnote-apple-tag.c",
52      "//third_party/libexif/libexif/huawei/exif-mnote-data-huawei.c",
53      "//third_party/libexif/libexif/huawei/mnote-huawei-data-type.c",
54      "//third_party/libexif/libexif/huawei/mnote-huawei-entry.c",
55      "//third_party/libexif/libexif/huawei/mnote-huawei-tag.c",
56    ]
57    cflags = [
58      "-DGETTEXT_PACKAGE=\"libexif-12\"",
59      "-DLOCALEDIR=\"//third_party/libexif/build/share/locale/locale\"",
60    ]
61  }
62
63  lite_library("libexif") {
64    if (ohos_kernel_type == "liteos_m") {
65      target_type = "static_library"
66    } else {
67      target_type = "shared_library"
68    }
69    sources = libexif_source
70
71    public_configs = [ ":libexif_config" ]
72  }
73} else {
74  import("//build/ohos.gni")
75
76  config("build_private_config") {
77    cflags = [
78      "-DGETTEXT_PACKAGE=\"libexif-12\"",
79      "-DLOCALEDIR=\"//third_party/libexif/build/share/locale\"",
80      "-Werror",
81      "-Wno-format",
82      "-Wno-sign-compare",
83      "-Wno-unused-parameter",
84      "-DHAVE_CONFIG_H",
85    ]
86  }
87
88  config("build_public_config") {
89    include_dirs = [ "//third_party/libexif" ]
90  }
91
92  ohos_source_set("exif_static") {
93    branch_protector_ret = "pac_ret"
94    sources = [
95      "//third_party/libexif/libexif/apple/exif-mnote-data-apple.c",
96      "//third_party/libexif/libexif/apple/mnote-apple-entry.c",
97      "//third_party/libexif/libexif/apple/mnote-apple-tag.c",
98      "//third_party/libexif/libexif/canon/exif-mnote-data-canon.c",
99      "//third_party/libexif/libexif/canon/mnote-canon-entry.c",
100      "//third_party/libexif/libexif/canon/mnote-canon-tag.c",
101      "//third_party/libexif/libexif/exif-byte-order.c",
102      "//third_party/libexif/libexif/exif-content.c",
103      "//third_party/libexif/libexif/exif-data.c",
104      "//third_party/libexif/libexif/exif-entry.c",
105      "//third_party/libexif/libexif/exif-format.c",
106      "//third_party/libexif/libexif/exif-gps-ifd.c",
107      "//third_party/libexif/libexif/exif-ifd.c",
108      "//third_party/libexif/libexif/exif-loader.c",
109      "//third_party/libexif/libexif/exif-log.c",
110      "//third_party/libexif/libexif/exif-mem.c",
111      "//third_party/libexif/libexif/exif-mnote-data.c",
112      "//third_party/libexif/libexif/exif-tag.c",
113      "//third_party/libexif/libexif/exif-utils.c",
114      "//third_party/libexif/libexif/fuji/exif-mnote-data-fuji.c",
115      "//third_party/libexif/libexif/fuji/mnote-fuji-entry.c",
116      "//third_party/libexif/libexif/fuji/mnote-fuji-tag.c",
117      "//third_party/libexif/libexif/huawei/exif-mnote-data-huawei.c",
118      "//third_party/libexif/libexif/huawei/mnote-huawei-data-type.c",
119      "//third_party/libexif/libexif/huawei/mnote-huawei-entry.c",
120      "//third_party/libexif/libexif/huawei/mnote-huawei-tag.c",
121      "//third_party/libexif/libexif/olympus/exif-mnote-data-olympus.c",
122      "//third_party/libexif/libexif/olympus/mnote-olympus-entry.c",
123      "//third_party/libexif/libexif/olympus/mnote-olympus-tag.c",
124      "//third_party/libexif/libexif/pentax/exif-mnote-data-pentax.c",
125      "//third_party/libexif/libexif/pentax/mnote-pentax-entry.c",
126      "//third_party/libexif/libexif/pentax/mnote-pentax-tag.c",
127    ]
128    include_dirs = [
129      "//third_party/libexif",
130      "//third_party/libexif/libexif",
131      "//third_party/libexif/libexif/pentax",
132      "//third_party/libexif/libexif/olympus",
133      "//third_party/libexif/libexif/apple",
134      "//third_party/libexif/libexif/canon",
135      "//third_party/libexif/libexif/fuji",
136      "//third_party/libexif/libexif/apple",
137      "//third_party/libexif/contrib/watcom",
138      "//third_party/libexif/libexif/huawei",
139    ]
140
141    configs = [ ":build_private_config" ]
142  }
143
144  ohos_shared_library("libexif") {
145    branch_protector_ret = "pac_ret"
146    deps = [ ":exif_static" ]
147    public_configs = [ ":build_public_config" ]
148    install_images = [ system_base_dir ]
149    subsystem_name = "thirdparty"
150    innerapi_tags = [ "chipsetsdk" ]
151    part_name = "libexif"
152  }
153}
154