From ed2297175eabde75cb039711658d834777caa53f Mon Sep 17 00:00:00 2001 From: agoode Date: Sun, 7 Feb 2016 14:27:38 -0800 Subject: Fix gn gen on //printing when use_sysroot = false BUG=580103 Review URL: https://codereview.chromium.org/1671203002 Cr-Commit-Position: refs/heads/master@{#374069} --- printing/BUILD.gn | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'printing') diff --git a/printing/BUILD.gn b/printing/BUILD.gn index 466388f..ce6c9d4 100644 --- a/printing/BUILD.gn +++ b/printing/BUILD.gn @@ -128,10 +128,16 @@ component("printing") { configs += [ ":cups" ] if (is_linux) { + # rebase_path does not accept an empty string + if (use_sysroot) { + cups_sysroot = rebase_path(sysroot) + } else { + cups_sysroot = "" + } cups_version = exec_script("cups_config_helper.py", [ "--api-version", - rebase_path(sysroot), + cups_sysroot, ], "trim string") @@ -241,10 +247,16 @@ if (use_cups) { libs = [ "cups" ] lib_dirs = [ "$mac_sdk_path/usr/lib" ] } else { + # rebase_path does not accept an empty string + if (use_sysroot) { + cups_sysroot = rebase_path(sysroot) + } else { + cups_sysroot = "" + } libs = exec_script("cups_config_helper.py", [ "--libs-for-gn", - rebase_path(sysroot), + cups_sysroot, ], "value") } -- cgit v1.1