1# 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 6template("third_party") { 7 config(target_name + "_public") { 8 if (defined(invoker.public_defines)) { 9 defines = invoker.public_defines 10 } 11 include_dirs = invoker.public_include_dirs 12 } 13 source_set(target_name) { 14 forward_variables_from(invoker, "*", [ "public_include_dirs" ]) 15 public_configs = [ ":" + target_name + "_public" ] 16 17 # Warnings are just noise if we're not maintaining the code. 18 if (is_win) { 19 cflags = [ "/w" ] 20 } else { 21 cflags = [ "-w" ] 22 } 23 } 24} 25 26set_defaults("third_party") { 27 configs = default_configs - [ "//gn:warnings" ] 28} 29 30template("system") { 31 config(target_name + "_public") { 32 forward_variables_from(invoker, "*", []) 33 } 34 group(target_name) { 35 public_configs = [ ":" + target_name + "_public" ] 36 } 37} 38