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 subsystem_name = "thirdparty" 94 part_name = "libexif" 95 96 if (is_arkui_x) { # Arkui_x not sopported external_deps 97 deps = [ "//third_party/bounds_checking_function:libsec_static" ] 98 } else { 99 external_deps = [ "bounds_checking_function:libsec_shared" ] 100 } 101 branch_protector_ret = "pac_ret" 102 sources = [ 103 "//third_party/libexif/libexif/apple/exif-mnote-data-apple.c", 104 "//third_party/libexif/libexif/apple/mnote-apple-entry.c", 105 "//third_party/libexif/libexif/apple/mnote-apple-tag.c", 106 "//third_party/libexif/libexif/canon/exif-mnote-data-canon.c", 107 "//third_party/libexif/libexif/canon/mnote-canon-entry.c", 108 "//third_party/libexif/libexif/canon/mnote-canon-tag.c", 109 "//third_party/libexif/libexif/exif-byte-order.c", 110 "//third_party/libexif/libexif/exif-content.c", 111 "//third_party/libexif/libexif/exif-data.c", 112 "//third_party/libexif/libexif/exif-entry.c", 113 "//third_party/libexif/libexif/exif-format.c", 114 "//third_party/libexif/libexif/exif-gps-ifd.c", 115 "//third_party/libexif/libexif/exif-ifd.c", 116 "//third_party/libexif/libexif/exif-loader.c", 117 "//third_party/libexif/libexif/exif-log.c", 118 "//third_party/libexif/libexif/exif-mem.c", 119 "//third_party/libexif/libexif/exif-mnote-data.c", 120 "//third_party/libexif/libexif/exif-tag.c", 121 "//third_party/libexif/libexif/exif-utils.c", 122 "//third_party/libexif/libexif/fuji/exif-mnote-data-fuji.c", 123 "//third_party/libexif/libexif/fuji/mnote-fuji-entry.c", 124 "//third_party/libexif/libexif/fuji/mnote-fuji-tag.c", 125 "//third_party/libexif/libexif/huawei/exif-mnote-data-huawei.c", 126 "//third_party/libexif/libexif/huawei/mnote-huawei-data-type.c", 127 "//third_party/libexif/libexif/huawei/mnote-huawei-entry.c", 128 "//third_party/libexif/libexif/huawei/mnote-huawei-tag.c", 129 "//third_party/libexif/libexif/olympus/exif-mnote-data-olympus.c", 130 "//third_party/libexif/libexif/olympus/mnote-olympus-entry.c", 131 "//third_party/libexif/libexif/olympus/mnote-olympus-tag.c", 132 "//third_party/libexif/libexif/pentax/exif-mnote-data-pentax.c", 133 "//third_party/libexif/libexif/pentax/mnote-pentax-entry.c", 134 "//third_party/libexif/libexif/pentax/mnote-pentax-tag.c", 135 ] 136 include_dirs = [ 137 "//third_party/libexif", 138 "//third_party/libexif/libexif", 139 "//third_party/libexif/libexif/pentax", 140 "//third_party/libexif/libexif/olympus", 141 "//third_party/libexif/libexif/apple", 142 "//third_party/libexif/libexif/canon", 143 "//third_party/libexif/libexif/fuji", 144 "//third_party/libexif/libexif/apple", 145 "//third_party/libexif/contrib/watcom", 146 "//third_party/libexif/libexif/huawei", 147 ] 148 149 configs = [ ":build_private_config" ] 150 } 151 152 ohos_shared_library("libexif") { 153 branch_protector_ret = "pac_ret" 154 deps = [ ":exif_static" ] 155 if (is_arkui_x) { 156 deps += [ "//third_party/bounds_checking_function:libsec_static" ] 157 } else { 158 external_deps = [ "bounds_checking_function:libsec_shared" ] 159 } 160 public_configs = [ ":build_public_config" ] 161 install_images = [ system_base_dir ] 162 subsystem_name = "thirdparty" 163 innerapi_tags = [ "chipsetsdk" ] 164 part_name = "libexif" 165 } 166} 167