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", |
Lei Zhang | ac52015 | 2018-11-09 22:58:56 +0000 | [diff] [blame] | 241 | "core/fpdfapi/render:unittests", |
Lei Zhang | f03f781 | 2018-10-15 23:48:29 +0000 | [diff] [blame] | 242 | "core/fpdfdoc:unittests", |
| 243 | "core/fpdftext:unittests", |
| 244 | "core/fxcodec:unittests", |
| 245 | "core/fxcrt", |
| 246 | "core/fxcrt:unittests", |
| 247 | "core/fxge", |
| 248 | "core/fxge:unittests", |
| 249 | "fpdfsdk:unittests", |
Lei Zhang | 1929d6e | 2018-10-15 23:51:28 +0000 | [diff] [blame] | 250 | "testing:test_support", |
Lei Zhang | f03f781 | 2018-10-15 23:48:29 +0000 | [diff] [blame] | 251 | "//testing/gmock", |
| 252 | "//testing/gtest", |
| 253 | ] |
| 254 | configs += [ ":pdfium_core_config" ] |
Lei Zhang | a996ff4 | 2018-10-15 23:49:48 +0000 | [diff] [blame] | 255 | |
| 256 | if (is_android) { |
| 257 | use_raw_android_executable = true |
| 258 | } |
| 259 | |
| 260 | if (pdf_enable_v8) { |
| 261 | configs += [ "//v8:external_startup_data" ] |
| 262 | deps += [ |
| 263 | "fxjs:unittests", |
| 264 | "//v8", |
| 265 | ] |
| 266 | } |
| 267 | |
Tom Sepez | d2e023b | 2015-12-08 14:36:16 -0800 | [diff] [blame] | 268 | if (pdf_enable_xfa) { |
Lei Zhang | f03f781 | 2018-10-15 23:48:29 +0000 | [diff] [blame] | 269 | deps += [ |
| 270 | "fxbarcode:unittests", |
| 271 | "xfa/fde:unittests", |
| 272 | "xfa/fgas", |
| 273 | "xfa/fgas:unittests", |
| 274 | "xfa/fwl:unittests", |
| 275 | "xfa/fxfa:unittests", |
| 276 | "xfa/fxfa/fm2js:unittests", |
| 277 | "xfa/fxfa/parser:unittests", |
Tom Sepez | d2e023b | 2015-12-08 14:36:16 -0800 | [diff] [blame] | 278 | ] |
| 279 | } |
Tom Sepez | 04681f3 | 2015-01-09 13:59:19 -0800 | [diff] [blame] | 280 | } |
Tom Sepez | 1b1bb49 | 2015-01-22 17:36:32 -0800 | [diff] [blame] | 281 | |
Lei Zhang | 1929d6e | 2018-10-15 23:51:28 +0000 | [diff] [blame] | 282 | group("pdfium_embeddertest_deps") { |
| 283 | testonly = true |
| 284 | public_deps = [ |
| 285 | ":pdfium_public_headers", |
| 286 | "core/fxcrt", |
| 287 | "testing:embedder_test_support", |
| 288 | "testing:test_support", |
| 289 | "//testing/gmock", |
| 290 | "//testing/gtest", |
| 291 | ] |
| 292 | visibility += [ |
| 293 | "core/*", |
| 294 | "fpdfsdk/*", |
| 295 | "fxjs/*", |
| 296 | "xfa/*", |
| 297 | ] |
| 298 | } |
| 299 | |
Tom Sepez | 1b1bb49 | 2015-01-22 17:36:32 -0800 | [diff] [blame] | 300 | test("pdfium_embeddertests") { |
Lei Zhang | dbaf3b8 | 2018-10-11 17:02:43 +0000 | [diff] [blame] | 301 | testonly = true |
Tom Sepez | 1b1bb49 | 2015-01-22 17:36:32 -0800 | [diff] [blame] | 302 | sources = [ |
Dan Sinclair | 5553d8b | 2018-01-03 09:44:28 -0500 | [diff] [blame] | 303 | "testing/embedder_test_main.cpp", |
Tom Sepez | 1b1bb49 | 2015-01-22 17:36:32 -0800 | [diff] [blame] | 304 | ] |
| 305 | deps = [ |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 306 | ":pdfium", |
Lei Zhang | 1929d6e | 2018-10-15 23:51:28 +0000 | [diff] [blame] | 307 | "core/fpdfapi/edit:embeddertests", |
| 308 | "core/fpdfapi/page:embeddertests", |
| 309 | "core/fpdfapi/parser:embeddertests", |
| 310 | "core/fpdfapi/render:embeddertests", |
| 311 | "core/fxcodec:embeddertests", |
| 312 | "core/fxge:embeddertests", |
| 313 | "fpdfsdk:embeddertests", |
| 314 | "fpdfsdk/pwl:embeddertests", |
| 315 | "testing:test_support", |
Lei Zhang | 76833a6 | 2018-10-12 18:53:17 +0000 | [diff] [blame] | 316 | "testing/image_diff", |
Dan Sinclair | fffc963 | 2016-03-08 08:57:05 -0500 | [diff] [blame] | 317 | "//testing/gmock", |
| 318 | "//testing/gtest", |
Tom Sepez | 1b1bb49 | 2015-01-22 17:36:32 -0800 | [diff] [blame] | 319 | ] |
dsinclair | 685bb88 | 2016-04-20 07:32:39 -0700 | [diff] [blame] | 320 | include_dirs = [ "testing/gmock/include" ] |
thestig | c65e11e | 2016-08-30 21:56:33 -0700 | [diff] [blame] | 321 | configs += [ ":pdfium_core_config" ] |
| 322 | |
Lei Zhang | a996ff4 | 2018-10-15 23:49:48 +0000 | [diff] [blame] | 323 | if (is_android) { |
| 324 | ignore_all_data_deps = true |
| 325 | use_raw_android_executable = true |
| 326 | } |
| 327 | |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 328 | if (pdf_enable_v8) { |
Lei Zhang | 1929d6e | 2018-10-15 23:51:28 +0000 | [diff] [blame] | 329 | deps += [ |
| 330 | "fxjs:embeddertests", |
| 331 | "//v8", |
Lei Zhang | 1ac47eb | 2015-12-21 11:04:44 -0800 | [diff] [blame] | 332 | ] |
Jochen Eisinger | 7ed503d | 2015-12-10 14:38:06 +0100 | [diff] [blame] | 333 | configs += [ "//v8:external_startup_data" ] |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 334 | } |
Lei Zhang | a996ff4 | 2018-10-15 23:49:48 +0000 | [diff] [blame] | 335 | |
Dan Sinclair | 14aacd5 | 2017-05-18 14:11:29 -0400 | [diff] [blame] | 336 | if (pdf_enable_xfa) { |
Lei Zhang | 1929d6e | 2018-10-15 23:51:28 +0000 | [diff] [blame] | 337 | deps += [ |
| 338 | "xfa/fwl:embeddertests", |
| 339 | "xfa/fxfa/parser:embeddertests", |
Dan Sinclair | 14aacd5 | 2017-05-18 14:11:29 -0400 | [diff] [blame] | 340 | ] |
| 341 | } |
Tom Sepez | 1b1bb49 | 2015-01-22 17:36:32 -0800 | [diff] [blame] | 342 | } |
dsinclair | 685bb88 | 2016-04-20 07:32:39 -0700 | [diff] [blame] | 343 | |
Tom Sepez | 1d78f4d | 2018-10-22 20:17:38 +0000 | [diff] [blame] | 344 | executable("pdfium_diff") { |
| 345 | testonly = true |
| 346 | sources = [ |
| 347 | "testing/image_diff/image_diff.cpp", |
| 348 | ] |
| 349 | deps = [ |
| 350 | ":pdfium", |
| 351 | "testing/image_diff", |
| 352 | "//build/win:default_exe_manifest", |
| 353 | ] |
| 354 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 355 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 356 | configs += [ ":pdfium_core_config" ] |
| 357 | } |
| 358 | |
dsinclair | 685bb88 | 2016-04-20 07:32:39 -0700 | [diff] [blame] | 359 | if (pdf_is_standalone) { |
Lei Zhang | 0a62427 | 2018-10-11 16:58:32 +0000 | [diff] [blame] | 360 | jumbo_source_set("samples") { |
dsinclair | 685bb88 | 2016-04-20 07:32:39 -0700 | [diff] [blame] | 361 | testonly = true |
| 362 | deps = [ |
| 363 | "//samples", |
| 364 | ] |
| 365 | } |
Lei Zhang | 143959d | 2017-06-22 12:20:58 -0700 | [diff] [blame] | 366 | |
thestig | 62114cf | 2016-11-08 12:59:30 -0800 | [diff] [blame] | 367 | group("fuzzers") { |
| 368 | testonly = true |
| 369 | deps = [ |
Lei Zhang | fa4d93a | 2018-05-25 21:47:19 +0000 | [diff] [blame] | 370 | "//testing/fuzzers", |
thestig | 62114cf | 2016-11-08 12:59:30 -0800 | [diff] [blame] | 371 | ] |
| 372 | } |
dsinclair | 685bb88 | 2016-04-20 07:32:39 -0700 | [diff] [blame] | 373 | } |
Lei Zhang | f02c8bf | 2017-04-01 01:35:01 -0700 | [diff] [blame] | 374 | |
| 375 | group("pdfium_all") { |
| 376 | testonly = true |
| 377 | deps = [ |
Tom Sepez | 1d78f4d | 2018-10-22 20:17:38 +0000 | [diff] [blame] | 378 | ":pdfium_diff", |
Lei Zhang | f02c8bf | 2017-04-01 01:35:01 -0700 | [diff] [blame] | 379 | ":pdfium_embeddertests", |
| 380 | ":pdfium_unittests", |
| 381 | ] |
| 382 | if (pdf_is_standalone) { |
| 383 | deps += [ |
| 384 | ":fuzzers", |
| 385 | ":samples", |
| 386 | ] |
| 387 | } |
| 388 | } |