OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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("//testing/test.gni") | 5 import("//testing/test.gni") |
6 | 6 |
7 pdf_use_skia = false | 7 pdf_use_skia = false |
8 | 8 |
9 declare_args() { | 9 declare_args() { |
10 # On Android there's no system FreeType. On Windows and Mac, only a few | 10 # On Android there's no system FreeType. On Windows and Mac, only a few |
11 # methods are used from it. | 11 # methods are used from it. |
12 bundle_freetype = !is_linux | 12 bundle_freetype = !is_linux |
13 } | 13 } |
14 | 14 |
15 config("pdfium_config") { | 15 config("pdfium_config") { |
16 cflags = [] | 16 cflags = [] |
17 include_dirs = [ "third_party/freetype/include" ] | 17 include_dirs = [ "third_party/freetype/include" ] |
18 defines = [ | 18 defines = [ |
19 "_FPDFSDK_LIB", | 19 "_FPDFSDK_LIB", |
20 "_NO_GDIPLUS_", # workaround text rendering issues on Windows | 20 "_NO_GDIPLUS_", # workaround text rendering issues on Windows |
21 "OPJ_STATIC", | 21 "OPJ_STATIC", |
22 ] | 22 ] |
23 | 23 |
24 if (pdf_use_skia) { | 24 if (pdf_use_skia) { |
25 defines += [ "_SKIA_SUPPORT_" ] | 25 defines += [ "_SKIA_SUPPORT_" ] |
26 } | 26 } |
27 | 27 |
28 if (is_linux) { | 28 if (is_linux) { |
29 if (cpu_arch == "x64") { | 29 if (current_cpu == "x64") { |
30 defines += [ "_FX_CPU_=_FX_X64_" ] | 30 defines += [ "_FX_CPU_=_FX_X64_" ] |
31 cflags += [ "-fPIC" ] | 31 cflags += [ "-fPIC" ] |
32 } else if (cpu_arch == "x86") { | 32 } else if (current_cpu == "x86") { |
33 defines += [ "_FX_CPU_=_FX_X86_" ] | 33 defines += [ "_FX_CPU_=_FX_X86_" ] |
34 } | 34 } |
35 } | 35 } |
36 | 36 |
37 if (is_win) { | 37 if (is_win) { |
38 cflags += [ | 38 cflags += [ |
39 "/wd4005", | 39 "/wd4005", |
40 "/wd4018", | 40 "/wd4018", |
41 "/wd4146", | 41 "/wd4146", |
42 "/wd4333", | 42 "/wd4333", |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 "testing/fx_string_testhelpers.h", | 827 "testing/fx_string_testhelpers.h", |
828 ] | 828 ] |
829 deps = [ | 829 deps = [ |
830 "//testing/gtest", | 830 "//testing/gtest", |
831 ":pdfium" | 831 ":pdfium" |
832 ] | 832 ] |
833 include_dirs = [ "." ] | 833 include_dirs = [ "." ] |
834 configs -= [ "//build/config/compiler:chromium_code" ] | 834 configs -= [ "//build/config/compiler:chromium_code" ] |
835 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] | 835 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] |
836 } | 836 } |
OLD | NEW |