• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
2
3if (defined(ohos_lite)) {
4  import("//build/lite/config/component/lite_component.gni")
5} else {
6  import("//build/ohos.gni")
7}
8
9config("libqrcodegen_config") {
10  include_dirs = [ "cpp" ]
11}
12
13config("qrcodegen_config") {
14  cflags = [
15    "-Wall",
16    "-fexceptions",
17  ]
18  cflags_cc = cflags
19}
20
21if (defined(ohos_lite)) {
22  lite_library("qrcodegen") {
23    if (ohos_kernel_type == "liteos_m") {
24      target_type = "static_library"
25    } else {
26      target_type = "shared_library"
27    }
28    sources = [ "cpp/qrcodegen.cpp" ]
29    include_dirs = [ "//third_party/qrcodegen/cpp" ]
30    cflags = [ "-Wall" ]
31    cflags_cc = cflags
32    public_configs = [ ":libqrcodegen_config" ]
33  }
34
35  lite_component("qrcode") {
36    features = [ ":qrcodegen" ]
37  }
38} else {
39  ohos_static_library("qrcodegen_static") {
40    sources = [ "cpp/qrcodegen.cpp" ]
41    include_dirs = [ "//third_party/qrcodegen/cpp" ]
42    configs = [ ":qrcodegen_config" ]
43    public_configs = [ ":libqrcodegen_config" ]
44  }
45}
46