blob: 37b1e036878ca773551242763d6ccbd2ccd2321c [file] [log] [blame]
abarth6fc8ff02016-07-15 15:15:15 -07001# Copyright 2016 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
mtkleinf037d482016-07-19 08:25:00 -07006template("third_party") {
mtklein25c81d42016-07-27 13:55:26 -07007 config(target_name + "_public") {
8 include_dirs = invoker.public_include_dirs
9 }
mtkleinf037d482016-07-19 08:25:00 -070010 source_set(target_name) {
mtklein25c81d42016-07-27 13:55:26 -070011 forward_variables_from(invoker, "*", [ "public_include_dirs" ])
12 public_configs = [ ":" + target_name + "_public" ]
abarth6fc8ff02016-07-15 15:15:15 -070013
mtkleinf037d482016-07-19 08:25:00 -070014 # Warnings are just noise if we're not maintaining the code.
herbb6318bf2016-09-16 13:29:57 -070015 if (is_win) {
16 cflags = [ "/w" ]
17 } else {
18 cflags = [ "-w" ]
19 }
mtkleinf037d482016-07-19 08:25:00 -070020 }
21}
halcanary19a97202016-08-03 15:08:04 -070022
23set_defaults("third_party") {
24 configs = default_configs
25}