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 shared_library("qrcodegen") { 23 sources = [ "cpp/QrCode.cpp" ] 24 include_dirs = [ "//third_party/qrcodegen/cpp" ] 25 cflags = [ 26 "-Wall", 27 "-fno-exceptions", 28 ] 29 cflags_cc = cflags 30 public_configs = [ ":libqrcodegen_config" ] 31 } 32 33 lite_component("qrcode") { 34 features = [ ":qrcodegen" ] 35 } 36} else { 37 ohos_static_library("qrcodegen_static") { 38 sources = [ "cpp/QrCode.cpp" ] 39 include_dirs = [ "//third_party/qrcodegen/cpp" ] 40 configs = [ ":qrcodegen_config" ] 41 public_configs = [ ":libqrcodegen_config" ] 42 } 43} 44