mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 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 | |
| 6 | declare_args() { |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 7 | skia_use_system_jsoncpp = is_official_build |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 8 | } |
| 9 | |
| 10 | import("../third_party.gni") |
| 11 | |
Leon Scroggins III | 6ccd2ca | 2017-01-26 17:21:27 -0500 | [diff] [blame] | 12 | if (skia_use_system_jsoncpp) { |
| 13 | system("jsoncpp") { |
| 14 | libs = [ "jsoncpp" ] |
| 15 | } |
| 16 | } else { |
| 17 | third_party("jsoncpp") { |
| 18 | public_include_dirs = [ "../externals/jsoncpp/include" ] |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 19 | |
Leon Scroggins III | 6ccd2ca | 2017-01-26 17:21:27 -0500 | [diff] [blame] | 20 | defines = [ "JSON_USE_EXCEPTION=0" ] |
| 21 | sources = [ |
| 22 | "../externals/jsoncpp/src/lib_json/json_reader.cpp", |
| 23 | "../externals/jsoncpp/src/lib_json/json_value.cpp", |
| 24 | "../externals/jsoncpp/src/lib_json/json_writer.cpp", |
| 25 | ] |
| 26 | testonly = true |
| 27 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 28 | } |