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

Side by Side Diff: BUILD.gn

Issue 1399833002: Allow building of XFA branch without XFA (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Keep GN in sync. Created 5 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
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfsave.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import("pdfium.gni")
7 pdf_use_skia = false
8
9 declare_args() {
10 # On Android there's no system FreeType. On Windows and Mac, only a few
11 # methods are used from it.
12 bundle_freetype = !is_linux
13 }
14 7
15 config("pdfium_config") { 8 config("pdfium_config") {
16 cflags = [] 9 cflags = []
17 include_dirs = [ "third_party/freetype/include" ] 10 include_dirs = [ "third_party/freetype/include" ]
18 defines = [ 11 defines = [
19 "OPJ_STATIC", 12 "OPJ_STATIC",
20 "PNG_PREFIX", 13 "PNG_PREFIX",
21 "PNGPREFIX_H", 14 "PNGPREFIX_H",
22 "PNG_USE_READ_MACROS", 15 "PNG_USE_READ_MACROS",
23 "V8_DEPRECATION_WARNINGS", 16 "V8_DEPRECATION_WARNINGS",
24 "_CRT_SECURE_NO_WARNINGS", 17 "_CRT_SECURE_NO_WARNINGS",
25 ] 18 ]
26 19
27 if (pdf_use_skia) { 20 if (pdf_use_skia) {
28 defines += [ "_SKIA_SUPPORT_" ] 21 defines += [ "_SKIA_SUPPORT_" ]
29 } 22 }
30 23
24 if (pdf_enable_xfa) {
25 defines += [ "PDF_ENABLE_XFA" ]
26 }
27
31 if (is_linux) { 28 if (is_linux) {
32 if (current_cpu == "x64") { 29 if (current_cpu == "x64") {
33 defines += [ "_FX_CPU_=_FX_X64_" ] 30 defines += [ "_FX_CPU_=_FX_X64_" ]
34 cflags += [ "-fPIC" ] 31 cflags += [ "-fPIC" ]
35 } else if (current_cpu == "x86") { 32 } else if (current_cpu == "x86") {
36 defines += [ "_FX_CPU_=_FX_X86_" ] 33 defines += [ "_FX_CPU_=_FX_X86_" ]
37 } 34 }
38 } 35 }
39 36
40 if (is_win) { 37 if (is_win) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ":fpdfdoc", 104 ":fpdfdoc",
108 ":fpdftext", 105 ":fpdftext",
109 ":fpdfxfa", 106 ":fpdfxfa",
110 ":fxcodec", 107 ":fxcodec",
111 ":fxcrt", 108 ":fxcrt",
112 ":fxedit", 109 ":fxedit",
113 ":fxge", 110 ":fxge",
114 ":javascript", 111 ":javascript",
115 ":jsapi", 112 ":jsapi",
116 ":pdfwindow", 113 ":pdfwindow",
117 ":xfa",
118 ] 114 ]
119 115
116 if (pdf_enable_xfa) {
117 deps += [ ":xfa" ]
118 }
119
120 if (is_win) { 120 if (is_win) {
121 libs += [ "advapi32.lib", "gdi32.lib", "user32.lib" ] 121 libs += [ "advapi32.lib", "gdi32.lib", "user32.lib" ]
122 } 122 }
123 123
124 if (is_mac) { 124 if (is_mac) {
125 libs += [ "AppKit.framework", "CoreFoundation.framework" ] 125 libs += [ "AppKit.framework", "CoreFoundation.framework" ]
126 } 126 }
127 127
128 if (bundle_freetype) { 128 if (bundle_freetype) {
129 deps += [ "third_party:freetype" ] 129 deps += [ "third_party:freetype" ]
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1487 ":pdfium" 1487 ":pdfium"
1488 ] 1488 ]
1489 include_dirs = [ 1489 include_dirs = [
1490 ".", 1490 ".",
1491 "//v8", 1491 "//v8",
1492 "//v8/include", 1492 "//v8/include",
1493 ] 1493 ]
1494 configs -= [ "//build/config/compiler:chromium_code" ] 1494 configs -= [ "//build/config/compiler:chromium_code" ]
1495 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] 1495 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ]
1496 } 1496 }
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfsave.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698