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