Tom Sepez | b545159 | 2016-02-22 16:48:02 -0800 | [diff] [blame] | 1 | # Copyright 2016 The Chromium Authors. All rights reserved. |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
Lei Zhang | 81a1ac4 | 2017-12-21 21:49:55 -0800 | [diff] [blame] | 5 | import("//build/config/jumbo.gni") |
Tom Sepez | a32f760 | 2015-01-15 09:34:34 -0800 | [diff] [blame] | 6 | import("//testing/test.gni") |
dsinclair | 038bf0b | 2016-04-30 06:00:05 -0700 | [diff] [blame] | 7 | import("pdfium.gni") |
John Abd-El-Malek | ef4dce4 | 2015-02-02 16:52:07 -0800 | [diff] [blame] | 8 | |
Dominik Röttsches | 4b0671a | 2017-03-30 11:07:43 +0300 | [diff] [blame] | 9 | group("freetype_common") { |
| 10 | public_deps = [] |
| 11 | if (pdf_bundle_freetype) { |
| 12 | public_deps += [ "third_party:fx_freetype" ] |
| 13 | } else { |
| 14 | public_deps += [ "//build/config/freetype" ] |
| 15 | } |
| 16 | } |
| 17 | |
weili | 0abe652 | 2016-06-06 14:41:22 -0700 | [diff] [blame] | 18 | config("pdfium_common_config") { |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 19 | cflags = [] |
dsinclair | 6e162b5 | 2017-01-24 11:18:16 -0800 | [diff] [blame] | 20 | ldflags = [] |
Dominik Röttsches | 4b0671a | 2017-03-30 11:07:43 +0300 | [diff] [blame] | 21 | include_dirs = [ "." ] |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 22 | defines = [ |
John Abd-El-Malek | ef4dce4 | 2015-02-02 16:52:07 -0800 | [diff] [blame] | 23 | "OPJ_STATIC", |
John Abd-El-Malek | 385729b | 2015-02-06 15:51:11 -0800 | [diff] [blame] | 24 | "PNG_PREFIX", |
John Abd-El-Malek | 385729b | 2015-02-06 15:51:11 -0800 | [diff] [blame] | 25 | "PNG_USE_READ_MACROS", |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 26 | ] |
| 27 | |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 28 | if (pdf_enable_v8) { |
| 29 | defines += [ "PDF_ENABLE_V8" ] |
| 30 | } |
| 31 | |
Ryan Harrison | 9ce75b8 | 2018-06-06 19:45:14 +0000 | [diff] [blame] | 32 | if (pdf_enable_click_logging) { |
| 33 | defines += [ "PDF_ENABLE_CLICK_LOGGING" ] |
| 34 | } |
| 35 | |
Tom Sepez | a8a39e2 | 2015-10-12 15:47:07 -0700 | [diff] [blame] | 36 | if (pdf_enable_xfa) { |
| 37 | defines += [ "PDF_ENABLE_XFA" ] |
Tom Sepez | 73c9f3b | 2017-02-27 10:12:59 -0800 | [diff] [blame] | 38 | if (pdf_enable_xfa_bmp) { |
| 39 | defines += [ "PDF_ENABLE_XFA_BMP" ] |
| 40 | } |
| 41 | if (pdf_enable_xfa_gif) { |
| 42 | defines += [ "PDF_ENABLE_XFA_GIF" ] |
| 43 | } |
| 44 | if (pdf_enable_xfa_png) { |
| 45 | defines += [ "PDF_ENABLE_XFA_PNG" ] |
| 46 | } |
| 47 | if (pdf_enable_xfa_tiff) { |
| 48 | defines += [ "PDF_ENABLE_XFA_TIFF" ] |
| 49 | } |
Tom Sepez | a8a39e2 | 2015-10-12 15:47:07 -0700 | [diff] [blame] | 50 | } |
thestig | 3e454bf | 2016-07-29 16:29:04 -0700 | [diff] [blame] | 51 | |
Lei Zhang | 360edeb | 2017-12-19 18:06:35 +0000 | [diff] [blame] | 52 | if (pdf_use_skia) { |
| 53 | defines += [ "_SKIA_SUPPORT_" ] |
| 54 | } |
| 55 | |
| 56 | if (pdf_use_skia_paths) { |
| 57 | defines += [ "_SKIA_SUPPORT_PATHS_" ] |
| 58 | } |
| 59 | |
thestig | 3e454bf | 2016-07-29 16:29:04 -0700 | [diff] [blame] | 60 | if (pdf_use_win32_gdi) { |
| 61 | defines += [ "PDFIUM_PRINT_TEXT_WITH_GDI" ] |
| 62 | } |
dsinclair | 6e162b5 | 2017-01-24 11:18:16 -0800 | [diff] [blame] | 63 | |
Dan Sinclair | 77e2a6c | 2017-03-13 09:35:12 -0400 | [diff] [blame] | 64 | if (is_win) { |
| 65 | # Assume UTF-8 by default to avoid code page dependencies. |
| 66 | cflags += [ "/utf-8" ] |
| 67 | } |
weili | 0abe652 | 2016-06-06 14:41:22 -0700 | [diff] [blame] | 68 | } |
Tom Sepez | a8a39e2 | 2015-10-12 15:47:07 -0700 | [diff] [blame] | 69 | |
weili | 0abe652 | 2016-06-06 14:41:22 -0700 | [diff] [blame] | 70 | config("pdfium_core_config") { |
| 71 | cflags = [] |
dsinclair | 8bd9ce0 | 2016-06-09 13:24:34 -0700 | [diff] [blame] | 72 | configs = [ ":pdfium_common_config" ] |
| 73 | defines = [ "V8_DEPRECATION_WARNINGS" ] |
Ryan Harrison | 3a3a369 | 2018-08-23 21:12:35 +0000 | [diff] [blame] | 74 | if (is_clang) { |
| 75 | cflags += [ "-Wshadow" ] |
| 76 | } |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 77 | if (is_linux) { |
Tom Sepez | 25d5be6 | 2015-06-18 17:44:29 -0700 | [diff] [blame] | 78 | if (current_cpu == "x64") { |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 79 | defines += [ "_FX_CPU_=_FX_X64_" ] |
| 80 | cflags += [ "-fPIC" ] |
Tom Sepez | 25d5be6 | 2015-06-18 17:44:29 -0700 | [diff] [blame] | 81 | } else if (current_cpu == "x86") { |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 82 | defines += [ "_FX_CPU_=_FX_X86_" ] |
| 83 | } |
| 84 | } |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 85 | if (is_win) { |
Tom Sepez | 3bb5751 | 2017-03-28 14:09:43 -0700 | [diff] [blame] | 86 | cflags += [ |
Tom Sepez | 5171a27 | 2017-06-01 12:29:09 -0700 | [diff] [blame] | 87 | "/wd4324", |
Tom Sepez | 3bb5751 | 2017-03-28 14:09:43 -0700 | [diff] [blame] | 88 | "/wd4577", |
| 89 | ] |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 90 | } |
Will Harris | b6dbcb2 | 2018-08-29 23:28:23 +0000 | [diff] [blame] | 91 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
weili | dcc29b1 | 2016-05-27 17:58:23 -0700 | [diff] [blame] | 92 | } |
Lei Zhang | 476ac13 | 2015-11-05 20:07:27 -0800 | [diff] [blame] | 93 | |
Lei Zhang | 1987bbf | 2018-10-15 23:12:06 +0000 | [diff] [blame] | 94 | jumbo_source_set("pdfium_public_headers") { |
| 95 | sources = [ |
| 96 | "public/cpp/fpdf_deleters.h", |
| 97 | "public/cpp/fpdf_scopers.h", |
| 98 | "public/fpdf_annot.h", |
| 99 | "public/fpdf_attachment.h", |
| 100 | "public/fpdf_catalog.h", |
| 101 | "public/fpdf_dataavail.h", |
| 102 | "public/fpdf_doc.h", |
| 103 | "public/fpdf_edit.h", |
| 104 | "public/fpdf_ext.h", |
| 105 | "public/fpdf_flatten.h", |
| 106 | "public/fpdf_formfill.h", |
| 107 | "public/fpdf_fwlevent.h", |
| 108 | "public/fpdf_ppo.h", |
| 109 | "public/fpdf_progressive.h", |
| 110 | "public/fpdf_save.h", |
| 111 | "public/fpdf_searchex.h", |
| 112 | "public/fpdf_structtree.h", |
| 113 | "public/fpdf_sysfontinfo.h", |
| 114 | "public/fpdf_text.h", |
| 115 | "public/fpdf_transformpage.h", |
| 116 | "public/fpdfview.h", |
| 117 | ] |
| 118 | } |
| 119 | |
Lei Zhang | 81a1ac4 | 2017-12-21 21:49:55 -0800 | [diff] [blame] | 120 | jumbo_static_library("pdfium") { |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 121 | sources = [ |
Dan Sinclair | 971a674 | 2018-03-28 19:23:25 +0000 | [diff] [blame] | 122 | "fpdfsdk/fpdf_annot.cpp", |
| 123 | "fpdfsdk/fpdf_attachment.cpp", |
| 124 | "fpdfsdk/fpdf_catalog.cpp", |
Dan Sinclair | f766ad2 | 2016-03-14 13:51:24 -0400 | [diff] [blame] | 125 | "fpdfsdk/fpdf_dataavail.cpp", |
Dan Sinclair | 971a674 | 2018-03-28 19:23:25 +0000 | [diff] [blame] | 126 | "fpdfsdk/fpdf_doc.cpp", |
| 127 | "fpdfsdk/fpdf_editimg.cpp", |
| 128 | "fpdfsdk/fpdf_editpage.cpp", |
| 129 | "fpdfsdk/fpdf_editpath.cpp", |
| 130 | "fpdfsdk/fpdf_edittext.cpp", |
Dan Sinclair | f766ad2 | 2016-03-14 13:51:24 -0400 | [diff] [blame] | 131 | "fpdfsdk/fpdf_ext.cpp", |
| 132 | "fpdfsdk/fpdf_flatten.cpp", |
Dan Sinclair | 971a674 | 2018-03-28 19:23:25 +0000 | [diff] [blame] | 133 | "fpdfsdk/fpdf_formfill.cpp", |
Lei Zhang | f7c84e9 | 2018-02-02 00:01:39 +0000 | [diff] [blame] | 134 | "fpdfsdk/fpdf_ppo.cpp", |
Dan Sinclair | f766ad2 | 2016-03-14 13:51:24 -0400 | [diff] [blame] | 135 | "fpdfsdk/fpdf_progressive.cpp", |
Dan Sinclair | 971a674 | 2018-03-28 19:23:25 +0000 | [diff] [blame] | 136 | "fpdfsdk/fpdf_save.cpp", |
Dan Sinclair | f766ad2 | 2016-03-14 13:51:24 -0400 | [diff] [blame] | 137 | "fpdfsdk/fpdf_searchex.cpp", |
thestig | 9067fd6 | 2016-11-23 14:10:06 -0800 | [diff] [blame] | 138 | "fpdfsdk/fpdf_structtree.cpp", |
Dan Sinclair | f766ad2 | 2016-03-14 13:51:24 -0400 | [diff] [blame] | 139 | "fpdfsdk/fpdf_sysfontinfo.cpp", |
Dan Sinclair | 971a674 | 2018-03-28 19:23:25 +0000 | [diff] [blame] | 140 | "fpdfsdk/fpdf_text.cpp", |
Dan Sinclair | f766ad2 | 2016-03-14 13:51:24 -0400 | [diff] [blame] | 141 | "fpdfsdk/fpdf_transformpage.cpp", |
Dan Sinclair | 971a674 | 2018-03-28 19:23:25 +0000 | [diff] [blame] | 142 | "fpdfsdk/fpdf_view.cpp", |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 143 | ] |
| 144 | |
| 145 | libs = [] |
weili | 0abe652 | 2016-06-06 14:41:22 -0700 | [diff] [blame] | 146 | configs += [ ":pdfium_core_config" ] |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 147 | |
| 148 | deps = [ |
Lei Zhang | 1987bbf | 2018-10-15 23:12:06 +0000 | [diff] [blame] | 149 | ":pdfium_public_headers", |
Lei Zhang | 76833a6 | 2018-10-12 18:53:17 +0000 | [diff] [blame] | 150 | "constants", |
Lei Zhang | 8460088 | 2018-10-12 18:58:21 +0000 | [diff] [blame] | 151 | "core/fdrm", |
| 152 | "core/fpdfapi", |
Lei Zhang | 21ce4ff | 2018-10-15 18:30:49 +0000 | [diff] [blame] | 153 | "core/fpdfapi/edit", |
| 154 | "core/fpdfapi/font", |
| 155 | "core/fpdfapi/page", |
| 156 | "core/fpdfapi/parser", |
| 157 | "core/fpdfapi/render", |
Lei Zhang | 8460088 | 2018-10-12 18:58:21 +0000 | [diff] [blame] | 158 | "core/fpdfdoc", |
| 159 | "core/fpdftext", |
| 160 | "core/fxcodec", |
Lei Zhang | 995374a | 2018-10-12 19:52:04 +0000 | [diff] [blame] | 161 | "core/fxcrt", |
Lei Zhang | 8460088 | 2018-10-12 18:58:21 +0000 | [diff] [blame] | 162 | "core/fxge", |
Lei Zhang | dcab8cf | 2018-10-12 18:39:56 +0000 | [diff] [blame] | 163 | "fpdfsdk", |
| 164 | "fpdfsdk/formfiller", |
| 165 | "fpdfsdk/pwl", |
Lei Zhang | a7dec32 | 2018-10-12 18:36:51 +0000 | [diff] [blame] | 166 | "fxjs", |
Dan Sinclair | fffc963 | 2016-03-08 08:57:05 -0500 | [diff] [blame] | 167 | "third_party:pdfium_base", |
Dan Sinclair | 844d79e | 2018-02-16 03:46:26 +0000 | [diff] [blame] | 168 | "third_party:skia_shared", |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 169 | ] |
| 170 | |
thestig | 73c4856 | 2016-09-06 14:07:17 -0700 | [diff] [blame] | 171 | public_deps = [ |
Lei Zhang | 1987bbf | 2018-10-15 23:12:06 +0000 | [diff] [blame] | 172 | ":pdfium_public_headers", |
Lei Zhang | 995374a | 2018-10-12 19:52:04 +0000 | [diff] [blame] | 173 | "core/fxcrt", |
thestig | 73c4856 | 2016-09-06 14:07:17 -0700 | [diff] [blame] | 174 | ] |
Tom Sepez | a8a39e2 | 2015-10-12 15:47:07 -0700 | [diff] [blame] | 175 | |
Lei Zhang | d7f51c7 | 2018-10-15 17:47:57 +0000 | [diff] [blame] | 176 | if (pdf_enable_xfa) { |
| 177 | deps += [ |
| 178 | "fpdfsdk/fpdfxfa", |
Lei Zhang | 21ce4ff | 2018-10-15 18:30:49 +0000 | [diff] [blame] | 179 | "fxbarcode", |
Lei Zhang | d7f51c7 | 2018-10-15 17:47:57 +0000 | [diff] [blame] | 180 | "xfa/fxfa", |
| 181 | "xfa/fxfa/parser", |
| 182 | ] |
Lei Zhang | d7f51c7 | 2018-10-15 17:47:57 +0000 | [diff] [blame] | 183 | } |
| 184 | |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 185 | if (is_win) { |
Dan Sinclair | bc6c672 | 2015-10-22 14:58:54 -0400 | [diff] [blame] | 186 | libs += [ |
| 187 | "advapi32.lib", |
| 188 | "gdi32.lib", |
| 189 | "user32.lib", |
| 190 | ] |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 191 | } |
| 192 | |
| 193 | if (is_mac) { |
Dan Sinclair | bc6c672 | 2015-10-22 14:58:54 -0400 | [diff] [blame] | 194 | libs += [ |
| 195 | "AppKit.framework", |
| 196 | "CoreFoundation.framework", |
| 197 | ] |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 198 | } |
John Abd-El-Malek | ef4dce4 | 2015-02-02 16:52:07 -0800 | [diff] [blame] | 199 | |
dan sinclair | fa171d2 | 2017-03-26 22:38:17 -0400 | [diff] [blame] | 200 | if (pdf_is_complete_lib) { |
| 201 | complete_static_lib = true |
Tom Anderson | da89ac4 | 2018-03-21 03:56:15 +0000 | [diff] [blame] | 202 | configs -= [ "//build/config/compiler:thin_archive" ] |
dan sinclair | fa171d2 | 2017-03-26 22:38:17 -0400 | [diff] [blame] | 203 | } |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 204 | } |
| 205 | |
Tom Sepez | d831dc7 | 2015-10-19 16:04:22 -0700 | [diff] [blame] | 206 | # Targets below this are only visible within this file (and to the |
| 207 | # top-level gn_visibility target used to help gn_all build everything). |
| 208 | visibility = [ |
| 209 | ":*", |
| 210 | "//:gn_visibility", |
| 211 | ] |
John Abd-El-Malek | d68f9a3 | 2014-06-05 12:45:33 -0700 | [diff] [blame] | 212 | |
Lei Zhang | f03f781 | 2018-10-15 23:48:29 +0000 | [diff] [blame] | 213 | group("pdfium_unittest_deps") { |
Lei Zhang | dbaf3b8 | 2018-10-11 17:02:43 +0000 | [diff] [blame] | 214 | testonly = true |
Lei Zhang | f03f781 | 2018-10-15 23:48:29 +0000 | [diff] [blame] | 215 | public_deps = [ |
| 216 | "core/fxcrt", |
Lei Zhang | 1929d6e | 2018-10-15 23:51:28 +0000 | [diff] [blame] | 217 | "testing:test_support", |
Tom Sepez | 16b9d77 | 2017-04-17 09:07:48 -0700 | [diff] [blame] | 218 | "//testing/gmock", |
Dan Sinclair | fffc963 | 2016-03-08 08:57:05 -0500 | [diff] [blame] | 219 | "//testing/gtest", |
Tom Sepez | 04681f3 | 2015-01-09 13:59:19 -0800 | [diff] [blame] | 220 | ] |
Lei Zhang | f03f781 | 2018-10-15 23:48:29 +0000 | [diff] [blame] | 221 | visibility += [ |
| 222 | "core/*", |
| 223 | "fpdfsdk/*", |
| 224 | "fxbarcode/*", |
| 225 | "fxjs/*", |
| 226 | "xfa/*", |
| 227 | ] |
| 228 | } |
| 229 | |
| 230 | test("pdfium_unittests") { |
| 231 | testonly = true |
| 232 | sources = [ |
| 233 | "testing/unit_test_main.cpp", |
| 234 | ] |
| 235 | deps = [ |
| 236 | "core/fdrm:unittests", |
| 237 | "core/fpdfapi/edit:unittests", |
| 238 | "core/fpdfapi/font:unittests", |
| 239 | "core/fpdfapi/page:unittests", |
| 240 | "core/fpdfapi/parser:unittests", |
| 241 | "core/fpdfdoc:unittests", |
| 242 | "core/fpdftext:unittests", |
| 243 | "core/fxcodec:unittests", |
| 244 | "core/fxcrt", |
| 245 | "core/fxcrt:unittests", |
| 246 | "core/fxge", |
| 247 | "core/fxge:unittests", |
| 248 | "fpdfsdk:unittests", |
Lei Zhang | 1929d6e | 2018-10-15 23:51:28 +0000 | [diff] [blame] | 249 | "testing:test_support", |
Lei Zhang | f03f781 | 2018-10-15 23:48:29 +0000 | [diff] [blame] | 250 | "//testing/gmock", |
| 251 | "//testing/gtest", |
| 252 | ] |
| 253 | configs += [ ":pdfium_core_config" ] |
Lei Zhang | a996ff4 | 2018-10-15 23:49:48 +0000 | [diff] [blame] | 254 | |
| 255 | if (is_android) { |
| 256 | use_raw_android_executable = true |
| 257 | } |
| 258 | |
| 259 | if (pdf_enable_v8) { |
| 260 | configs += [ "//v8:external_startup_data" ] |
| 261 | deps += [ |
| 262 | "fxjs:unittests", |
| 263 | "//v8", |
| 264 | ] |
| 265 | } |
| 266 | |
Tom Sepez | d2e023b | 2015-12-08 14:36:16 -0800 | [diff] [blame] | 267 | if (pdf_enable_xfa) { |
Lei Zhang | f03f781 | 2018-10-15 23:48:29 +0000 | [diff] [blame] | 268 | deps += [ |
| 269 | "fxbarcode:unittests", |
| 270 | "xfa/fde:unittests", |
| 271 | "xfa/fgas", |
| 272 | "xfa/fgas:unittests", |
| 273 | "xfa/fwl:unittests", |
| 274 | "xfa/fxfa:unittests", |
| 275 | "xfa/fxfa/fm2js:unittests", |
| 276 | "xfa/fxfa/parser:unittests", |
Tom Sepez | d2e023b | 2015-12-08 14:36:16 -0800 | [diff] [blame] | 277 | ] |
| 278 | } |
Tom Sepez | 04681f3 | 2015-01-09 13:59:19 -0800 | [diff] [blame] | 279 | } |
Tom Sepez | 1b1bb49 | 2015-01-22 17:36:32 -0800 | [diff] [blame] | 280 | |
Lei Zhang | 1929d6e | 2018-10-15 23:51:28 +0000 | [diff] [blame] | 281 | group("pdfium_embeddertest_deps") { |
| 282 | testonly = true |
| 283 | public_deps = [ |
| 284 | ":pdfium_public_headers", |
| 285 | "core/fxcrt", |
| 286 | "testing:embedder_test_support", |
| 287 | "testing:test_support", |
| 288 | "//testing/gmock", |
| 289 | "//testing/gtest", |
| 290 | ] |
| 291 | visibility += [ |
| 292 | "core/*", |
| 293 | "fpdfsdk/*", |
| 294 | "fxjs/*", |
| 295 | "xfa/*", |
| 296 | ] |
| 297 | } |
| 298 | |
Tom Sepez | 1b1bb49 | 2015-01-22 17:36:32 -0800 | [diff] [blame] | 299 | test("pdfium_embeddertests") { |
Lei Zhang | dbaf3b8 | 2018-10-11 17:02:43 +0000 | [diff] [blame] | 300 | testonly = true |
Tom Sepez | 1b1bb49 | 2015-01-22 17:36:32 -0800 | [diff] [blame] | 301 | sources = [ |
Dan Sinclair | 5553d8b | 2018-01-03 09:44:28 -0500 | [diff] [blame] | 302 | "testing/embedder_test_main.cpp", |
Tom Sepez | 1b1bb49 | 2015-01-22 17:36:32 -0800 | [diff] [blame] | 303 | ] |
| 304 | deps = [ |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 305 | ":pdfium", |
Lei Zhang | 1929d6e | 2018-10-15 23:51:28 +0000 | [diff] [blame] | 306 | "core/fpdfapi/edit:embeddertests", |
| 307 | "core/fpdfapi/page:embeddertests", |
| 308 | "core/fpdfapi/parser:embeddertests", |
| 309 | "core/fpdfapi/render:embeddertests", |
| 310 | "core/fxcodec:embeddertests", |
| 311 | "core/fxge:embeddertests", |
| 312 | "fpdfsdk:embeddertests", |
| 313 | "fpdfsdk/pwl:embeddertests", |
| 314 | "testing:test_support", |
Lei Zhang | 76833a6 | 2018-10-12 18:53:17 +0000 | [diff] [blame] | 315 | "testing/image_diff", |
Dan Sinclair | fffc963 | 2016-03-08 08:57:05 -0500 | [diff] [blame] | 316 | "//testing/gmock", |
| 317 | "//testing/gtest", |
Tom Sepez | 1b1bb49 | 2015-01-22 17:36:32 -0800 | [diff] [blame] | 318 | ] |
dsinclair | 685bb88 | 2016-04-20 07:32:39 -0700 | [diff] [blame] | 319 | include_dirs = [ "testing/gmock/include" ] |
thestig | c65e11e | 2016-08-30 21:56:33 -0700 | [diff] [blame] | 320 | configs += [ ":pdfium_core_config" ] |
| 321 | |
Lei Zhang | a996ff4 | 2018-10-15 23:49:48 +0000 | [diff] [blame] | 322 | if (is_android) { |
| 323 | ignore_all_data_deps = true |
| 324 | use_raw_android_executable = true |
| 325 | } |
| 326 | |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 327 | if (pdf_enable_v8) { |
Lei Zhang | 1929d6e | 2018-10-15 23:51:28 +0000 | [diff] [blame] | 328 | deps += [ |
| 329 | "fxjs:embeddertests", |
| 330 | "//v8", |
Lei Zhang | 1ac47eb | 2015-12-21 11:04:44 -0800 | [diff] [blame] | 331 | ] |
Jochen Eisinger | 7ed503d | 2015-12-10 14:38:06 +0100 | [diff] [blame] | 332 | configs += [ "//v8:external_startup_data" ] |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 333 | } |
Lei Zhang | a996ff4 | 2018-10-15 23:49:48 +0000 | [diff] [blame] | 334 | |
Dan Sinclair | 14aacd5 | 2017-05-18 14:11:29 -0400 | [diff] [blame] | 335 | if (pdf_enable_xfa) { |
Lei Zhang | 1929d6e | 2018-10-15 23:51:28 +0000 | [diff] [blame] | 336 | deps += [ |
| 337 | "xfa/fwl:embeddertests", |
| 338 | "xfa/fxfa/parser:embeddertests", |
Dan Sinclair | 14aacd5 | 2017-05-18 14:11:29 -0400 | [diff] [blame] | 339 | ] |
| 340 | } |
Tom Sepez | 1b1bb49 | 2015-01-22 17:36:32 -0800 | [diff] [blame] | 341 | } |
dsinclair | 685bb88 | 2016-04-20 07:32:39 -0700 | [diff] [blame] | 342 | |
| 343 | if (pdf_is_standalone) { |
Lei Zhang | 0a62427 | 2018-10-11 16:58:32 +0000 | [diff] [blame] | 344 | jumbo_source_set("samples") { |
dsinclair | 685bb88 | 2016-04-20 07:32:39 -0700 | [diff] [blame] | 345 | testonly = true |
| 346 | deps = [ |
| 347 | "//samples", |
| 348 | ] |
| 349 | } |
Lei Zhang | 143959d | 2017-06-22 12:20:58 -0700 | [diff] [blame] | 350 | |
| 351 | executable("pdfium_diff") { |
| 352 | testonly = true |
| 353 | sources = [ |
| 354 | "testing/image_diff/image_diff.cpp", |
| 355 | ] |
| 356 | deps = [ |
Lei Zhang | 143959d | 2017-06-22 12:20:58 -0700 | [diff] [blame] | 357 | ":pdfium", |
Lei Zhang | 76833a6 | 2018-10-12 18:53:17 +0000 | [diff] [blame] | 358 | "testing/image_diff", |
Lei Zhang | 143959d | 2017-06-22 12:20:58 -0700 | [diff] [blame] | 359 | "//build/win:default_exe_manifest", |
| 360 | ] |
| 361 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 362 | configs += [ "//build/config/compiler:no_chromium_code" ] |
Ryan Harrison | 7b8f88a | 2017-07-13 16:05:31 -0400 | [diff] [blame] | 363 | configs += [ ":pdfium_core_config" ] |
Lei Zhang | 143959d | 2017-06-22 12:20:58 -0700 | [diff] [blame] | 364 | } |
| 365 | |
thestig | 62114cf | 2016-11-08 12:59:30 -0800 | [diff] [blame] | 366 | group("fuzzers") { |
| 367 | testonly = true |
| 368 | deps = [ |
Lei Zhang | fa4d93a | 2018-05-25 21:47:19 +0000 | [diff] [blame] | 369 | "//testing/fuzzers", |
thestig | 62114cf | 2016-11-08 12:59:30 -0800 | [diff] [blame] | 370 | ] |
| 371 | } |
dsinclair | 685bb88 | 2016-04-20 07:32:39 -0700 | [diff] [blame] | 372 | } |
Lei Zhang | f02c8bf | 2017-04-01 01:35:01 -0700 | [diff] [blame] | 373 | |
| 374 | group("pdfium_all") { |
| 375 | testonly = true |
| 376 | deps = [ |
| 377 | ":pdfium_embeddertests", |
| 378 | ":pdfium_unittests", |
| 379 | ] |
| 380 | if (pdf_is_standalone) { |
| 381 | deps += [ |
| 382 | ":fuzzers", |
Lei Zhang | 143959d | 2017-06-22 12:20:58 -0700 | [diff] [blame] | 383 | ":pdfium_diff", |
Lei Zhang | f02c8bf | 2017-04-01 01:35:01 -0700 | [diff] [blame] | 384 | ":samples", |
| 385 | ] |
| 386 | } |
| 387 | } |