• 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    ]
18
19    libexif_source = [
20      "//third_party/libexif/libexif/exif-byte-order.c",
21      "//third_party/libexif/libexif/exif-content.c",
22      "//third_party/libexif/libexif/exif-data.c",
23      "//third_party/libexif/libexif/exif-entry.c",
24      "//third_party/libexif/libexif/exif-format.c",
25      "//third_party/libexif/libexif/exif-gps-ifd.c",
26      "//third_party/libexif/libexif/exif-ifd.c",
27      "//third_party/libexif/libexif/exif-loader.c",
28      "//third_party/libexif/libexif/exif-log.c",
29      "//third_party/libexif/libexif/exif-mem.c",
30      "//third_party/libexif/libexif/exif-mnote-data.c",
31      "//third_party/libexif/libexif/exif-tag.c",
32      "//third_party/libexif/libexif/exif-utils.c",
33      "//third_party/libexif/libexif/pentax/exif-mnote-data-pentax.c",
34      "//third_party/libexif/libexif/pentax/mnote-pentax-entry.c",
35      "//third_party/libexif/libexif/pentax/mnote-pentax-tag.c",
36      "//third_party/libexif/libexif/olympus/exif-mnote-data-olympus.c",
37      "//third_party/libexif/libexif/olympus/mnote-olympus-entry.c",
38      "//third_party/libexif/libexif/olympus/mnote-olympus-tag.c",
39      "//third_party/libexif/libexif/fuji/exif-mnote-data-fuji.c",
40      "//third_party/libexif/libexif/fuji/mnote-fuji-entry.c",
41      "//third_party/libexif/libexif/fuji/mnote-fuji-tag.c",
42      "//third_party/libexif/libexif/apple/exif-mnote-data-apple.c",
43      "//third_party/libexif/libexif/apple/mnote-apple-entry.c",
44      "//third_party/libexif/libexif/apple/mnote-apple-tag.c",
45      "//third_party/libexif/libexif/canon/exif-mnote-data-canon.c",
46      "//third_party/libexif/libexif/canon/mnote-canon-entry.c",
47      "//third_party/libexif/libexif/canon/mnote-canon-tag.c",
48      "//third_party/libexif/libexif/apple/exif-mnote-data-apple.c",
49      "//third_party/libexif/libexif/apple/mnote-apple-entry.c",
50      "//third_party/libexif/libexif/apple/mnote-apple-tag.c",
51    ]
52    cflags = [
53      "-DGETTEXT_PACKAGE=\"libexif-12\"",
54      "-DLOCALEDIR=\"//third_party/libexif/build/share/locale/locale\"",
55    ]
56  }
57
58  lite_library("libexif") {
59    if (ohos_kernel_type == "liteos_m") {
60      target_type = "static_library"
61    } else {
62      target_type = "shared_library"
63    }
64    sources = libexif_source
65
66    public_configs = [ ":libexif_config" ]
67  }
68} else {
69  import("//build/ohos.gni")
70
71  config("build_private_config") {
72    cflags = [
73      "-DGETTEXT_PACKAGE=\"libexif-12\"",
74      "-DLOCALEDIR=\"//third_party/libexif/build/share/locale\"",
75      "-Werror",
76      "-Wno-format",
77      "-Wno-sign-compare",
78      "-Wno-unused-parameter",
79      "-DHAVE_CONFIG_H",
80    ]
81  }
82
83  ohos_source_set("exif_static") {
84    sources = [
85      "//third_party/libexif/libexif/apple/exif-mnote-data-apple.c",
86      "//third_party/libexif/libexif/apple/mnote-apple-entry.c",
87      "//third_party/libexif/libexif/apple/mnote-apple-tag.c",
88      "//third_party/libexif/libexif/canon/exif-mnote-data-canon.c",
89      "//third_party/libexif/libexif/canon/mnote-canon-entry.c",
90      "//third_party/libexif/libexif/canon/mnote-canon-tag.c",
91      "//third_party/libexif/libexif/exif-byte-order.c",
92      "//third_party/libexif/libexif/exif-content.c",
93      "//third_party/libexif/libexif/exif-data.c",
94      "//third_party/libexif/libexif/exif-entry.c",
95      "//third_party/libexif/libexif/exif-format.c",
96      "//third_party/libexif/libexif/exif-gps-ifd.c",
97      "//third_party/libexif/libexif/exif-ifd.c",
98      "//third_party/libexif/libexif/exif-loader.c",
99      "//third_party/libexif/libexif/exif-log.c",
100      "//third_party/libexif/libexif/exif-mem.c",
101      "//third_party/libexif/libexif/exif-mnote-data.c",
102      "//third_party/libexif/libexif/exif-tag.c",
103      "//third_party/libexif/libexif/exif-utils.c",
104      "//third_party/libexif/libexif/fuji/exif-mnote-data-fuji.c",
105      "//third_party/libexif/libexif/fuji/mnote-fuji-entry.c",
106      "//third_party/libexif/libexif/fuji/mnote-fuji-tag.c",
107      "//third_party/libexif/libexif/olympus/exif-mnote-data-olympus.c",
108      "//third_party/libexif/libexif/olympus/mnote-olympus-entry.c",
109      "//third_party/libexif/libexif/olympus/mnote-olympus-tag.c",
110      "//third_party/libexif/libexif/pentax/exif-mnote-data-pentax.c",
111      "//third_party/libexif/libexif/pentax/mnote-pentax-entry.c",
112      "//third_party/libexif/libexif/pentax/mnote-pentax-tag.c",
113    ]
114    include_dirs = [
115      "//third_party/libexif",
116      "//third_party/libexif/libexif",
117      "//third_party/libexif/libexif/pentax",
118      "//third_party/libexif/libexif/olympus",
119      "//third_party/libexif/libexif/apple",
120      "//third_party/libexif/libexif/canon",
121      "//third_party/libexif/libexif/fuji",
122      "//third_party/libexif/libexif/apple",
123      "//third_party/libexif/contrib/watcom",
124    ]
125
126    configs = [ ":build_private_config" ]
127  }
128
129  ohos_shared_library("libexif") {
130    deps = [ ":exif_static" ]
131    install_images = [ system_base_dir ]
132    subsystem_name = "thirdparty"
133    innerapi_tags = [ "chipsetsdk" ]
134    part_name = "libexif"
135  }
136}
137