aboutsummaryrefslogtreecommitdiff
path: root/third_party/tinycbor/BUILD.gn
diff options
context:
space:
mode:
authorbtolsch <btolsch@chromium.org>2019-03-29 16:48:49 -0700
committerCommit Bot <commit-bot@chromium.org>2019-03-29 23:54:46 +0000
commit2f2e7fa4e9e4fc1e0a95ee632171d49c30d51dba (patch)
treefc1e91e268efffe6ba903b1b3584a77031f86a04 /third_party/tinycbor/BUILD.gn
parent8774ef2c7eaa31e1fec2ee7faef529e7e1cc7b01 (diff)
downloadopenscreen-2f2e7fa4e9e4fc1e0a95ee632171d49c30d51dba.tar.gz
Add initial chromium compile support
This change updates various BUILD.gn files to work in both standalone builds and Chromium builds. There are several main changes that have to take place: 1. Change abseil include paths so we can use any abseil location. 2. Change logging macros to use Chromium's //base/logging.h. 3. Separate out files with the GN variable build_with_chromium. 4. Add a new config to each target to maintain our include structure and change over the logging macros. Change-Id: I066698cd07b2315842c700b5adf01bdc656db9be Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1534469 Commit-Queue: Brandon Tolsch <btolsch@chromium.org> Reviewed-by: Peter Thatcher <pthatcher@google.com> Reviewed-by: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
Diffstat (limited to 'third_party/tinycbor/BUILD.gn')
-rw-r--r--third_party/tinycbor/BUILD.gn10
1 files changed, 8 insertions, 2 deletions
diff --git a/third_party/tinycbor/BUILD.gn b/third_party/tinycbor/BUILD.gn
index f478381c..5127febb 100644
--- a/third_party/tinycbor/BUILD.gn
+++ b/third_party/tinycbor/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build_overrides/build.gni")
+
source_set("tinycbor") {
sources = [
"src/src/cbor.h",
@@ -14,8 +16,12 @@ source_set("tinycbor") {
"src/src/utf8_p.h",
]
- configs -= [ "//build/config:symbol_visibility_hidden" ]
- configs += [ "//build/config:symbol_visibility_default" ]
+ config_path = "//build/config"
+ if (build_with_chromium) {
+ config_path += "/gcc"
+ }
+ configs -= [ "$config_path:symbol_visibility_hidden" ]
+ configs += [ "$config_path:symbol_visibility_default" ]
defines = [ "WITHOUT_OPEN_MEMSTREAM" ]
}