2016-07-15 22:15:15 +00:00
|
|
|
# Copyright 2016 Google Inc.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
2016-07-19 15:25:00 +00:00
|
|
|
template("third_party") {
|
2016-07-27 20:55:26 +00:00
|
|
|
config(target_name + "_public") {
|
2016-10-11 22:13:53 +00:00
|
|
|
if (defined(invoker.public_defines)) {
|
|
|
|
defines = invoker.public_defines
|
|
|
|
}
|
2016-07-27 20:55:26 +00:00
|
|
|
include_dirs = invoker.public_include_dirs
|
|
|
|
}
|
2016-07-19 15:25:00 +00:00
|
|
|
source_set(target_name) {
|
2016-07-27 20:55:26 +00:00
|
|
|
forward_variables_from(invoker, "*", [ "public_include_dirs" ])
|
|
|
|
public_configs = [ ":" + target_name + "_public" ]
|
2016-07-19 15:25:00 +00:00
|
|
|
|
|
|
|
# Warnings are just noise if we're not maintaining the code.
|
2016-09-16 20:29:57 +00:00
|
|
|
if (is_win) {
|
|
|
|
cflags = [ "/w" ]
|
|
|
|
} else {
|
|
|
|
cflags = [ "-w" ]
|
|
|
|
}
|
2016-07-19 15:25:00 +00:00
|
|
|
}
|
|
|
|
}
|
2016-08-03 22:08:04 +00:00
|
|
|
|
|
|
|
set_defaults("third_party") {
|
2016-10-13 03:58:06 +00:00
|
|
|
configs = default_configs - [ "//gn:warnings" ]
|
2016-08-03 22:08:04 +00:00
|
|
|
}
|