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 defines = [ | 18 defines = [ |
18 "_FPDFSDK_LIB", | 19 "_FPDFSDK_LIB", |
19 "_NO_GDIPLUS_", # workaround text rendering issues on Windows | 20 "_NO_GDIPLUS_", # workaround text rendering issues on Windows |
20 "OPJ_STATIC", | 21 "OPJ_STATIC", |
21 ] | 22 ] |
22 | 23 |
23 if (pdf_use_skia) { | 24 if (pdf_use_skia) { |
24 defines += [ "_SKIA_SUPPORT_" ] | 25 defines += [ "_SKIA_SUPPORT_" ] |
25 } | 26 } |
26 | 27 |
(...skipping 10 matching lines...) Expand all Loading... |
37 cflags += [ | 38 cflags += [ |
38 "/wd4005", | 39 "/wd4005", |
39 "/wd4018", | 40 "/wd4018", |
40 "/wd4146", | 41 "/wd4146", |
41 "/wd4333", | 42 "/wd4333", |
42 "/wd4345", | 43 "/wd4345", |
43 ] | 44 ] |
44 } | 45 } |
45 | 46 |
46 if (bundle_freetype) { | 47 if (bundle_freetype) { |
47 include_dirs = [ "third_party/freetype/include" ] | |
48 defines += [ "FT2_BUILD_LIBRARY" ] | 48 defines += [ "FT2_BUILD_LIBRARY" ] |
49 } else { | |
50 include_dirs = [ "/usr/include/freetype2" ] | |
51 } | 49 } |
52 } | 50 } |
53 | 51 |
54 static_library("pdfium") { | 52 static_library("pdfium") { |
55 sources = [ | 53 sources = [ |
56 "fpdfsdk/include/fpdfdoc.h", | 54 "fpdfsdk/include/fpdfdoc.h", |
57 "fpdfsdk/include/fpdfedit.h", | 55 "fpdfsdk/include/fpdfedit.h", |
58 "fpdfsdk/include/fpdfformfill.h", | 56 "fpdfsdk/include/fpdfformfill.h", |
59 "fpdfsdk/include/fpdftext.h", | 57 "fpdfsdk/include/fpdftext.h", |
60 "fpdfsdk/include/fpdfview.h", | 58 "fpdfsdk/include/fpdfview.h", |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 "testing/fx_string_testhelpers.h", | 835 "testing/fx_string_testhelpers.h", |
838 ] | 836 ] |
839 deps = [ | 837 deps = [ |
840 "//testing/gtest", | 838 "//testing/gtest", |
841 ":pdfium" | 839 ":pdfium" |
842 ] | 840 ] |
843 include_dirs = [ "." ] | 841 include_dirs = [ "." ] |
844 configs -= [ "//build/config/compiler:chromium_code" ] | 842 configs -= [ "//build/config/compiler:chromium_code" ] |
845 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] | 843 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] |
846 } | 844 } |
OLD | NEW |