Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: tools/gn/secondary/crypto/ssl/BUILD.gn

Issue 24657003: GN: Return array from pkgconfig wrapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: empty list Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("flags.gni") 5 import("flags.gni")
6 6
7 config("ssl_preprocessor_flags") { 7 config("ssl_preprocessor_flags") {
8 if (use_openssl) { 8 if (use_openssl) {
9 defines = [ "USE_OPENSSL" ] 9 defines = [ "USE_OPENSSL" ]
10 } else if (use_nss) { 10 } else if (use_nss) {
11 defines = [ "USE_NSS" ] 11 defines = [ "USE_NSS" ]
12 } 12 }
13 } 13 }
14 14
15 # Config for system SSL on Linux. 15 # Config for system SSL on Linux.
16 if (is_linux && use_system_ssl) { 16 if (is_linux && use_system_ssl) {
17 pkg_script = "//build/config/linux/pkg-config.py" 17 pkg_script = "//build/config/linux/pkg-config.py"
18 config("system_ssl_config") { 18 config("system_ssl_config") {
19 defines = [ "USE_SYSTEM_SSL" ] 19 defines = [ "USE_SYSTEM_SSL" ]
20 cflags = exec_script(pkg_script, [ "--cflags", "nss" ], "list lines") 20 pkgresult = exec_script(pkg_script, [ "nss" ], "value")
21 ldflags = exec_script(pkg_script, [ "--libs", "nss" ], "list lines") 21 includes = pkgresult[0]
22 cflags = pkgresult[1]
23 ldflags = pkgresult[2]
22 } 24 }
23 } 25 }
24 26
25 # This meta-target will include the SSL library according to the build flags. 27 # This meta-target will include the SSL library according to the build flags.
26 group("metassl") { 28 group("metassl") {
27 direct_dependent_configs = [ ":ssl_preprocessor_flags" ] 29 direct_dependent_configs = [ ":ssl_preprocessor_flags" ]
28 30
29 if (use_openssl) { 31 if (use_openssl) {
30 assert(is_linux) 32 assert(is_linux)
31 deps = "//third_party/openssl" 33 deps = "//third_party/openssl"
32 use_openssl = false 34 use_openssl = false
33 } else if (use_system_ssl) { 35 } else if (use_system_ssl) {
34 assert(is_linux) 36 assert(is_linux)
35 direct_dependent_configs = ":system_ssl_config" 37 direct_dependent_configs = ":system_ssl_config"
36 } else { 38 } else {
37 deps = [ "//net/third_party/nss/ssl" ] 39 deps = [ "//net/third_party/nss/ssl" ]
38 } 40 }
39 41
40 forward_dependent_configs_from = deps 42 forward_dependent_configs_from = deps
41 } 43 }
OLDNEW
« no previous file with comments | « tools/gn/secondary/build/config/linux/pkg-config.py ('k') | tools/gn/secondary/third_party/nss/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698