Tom Sepez | 65edf59 | 2014-11-13 17:04:15 -0800 | [diff] [blame] | 1 | # Copyright 2014 PDFium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
Oliver Chang | 17e920d | 2015-11-18 09:26:28 -0800 | [diff] [blame] | 5 | import("//build/config/sanitizers/sanitizers.gni") |
dsinclair | 038bf0b | 2016-04-30 06:00:05 -0700 | [diff] [blame] | 6 | import("../pdfium.gni") |
Tom Sepez | a8a39e2 | 2015-10-12 15:47:07 -0700 | [diff] [blame] | 7 | |
Tom Sepez | 65edf59 | 2014-11-13 17:04:15 -0800 | [diff] [blame] | 8 | group("samples") { |
Tom Sepez | d831dc7 | 2015-10-19 16:04:22 -0700 | [diff] [blame] | 9 | testonly = true |
Tom Sepez | 65edf59 | 2014-11-13 17:04:15 -0800 | [diff] [blame] | 10 | deps = [ |
Cary Clark | 399be5b | 2016-03-14 16:51:29 -0400 | [diff] [blame] | 11 | ":pdfium_test", |
Tom Sepez | 65edf59 | 2014-11-13 17:04:15 -0800 | [diff] [blame] | 12 | ] |
| 13 | } |
| 14 | |
John Abd-El-Malek | ca6c0d3 | 2015-02-17 13:26:45 -0800 | [diff] [blame] | 15 | config("pdfium_samples_config") { |
dsinclair | 6e162b5 | 2017-01-24 11:18:16 -0800 | [diff] [blame] | 16 | cflags = [] |
| 17 | ldflags = [] |
John Abd-El-Malek | ca6c0d3 | 2015-02-17 13:26:45 -0800 | [diff] [blame] | 18 | defines = [ |
| 19 | "PNG_PREFIX", |
John Abd-El-Malek | ca6c0d3 | 2015-02-17 13:26:45 -0800 | [diff] [blame] | 20 | "PNG_USE_READ_MACROS", |
| 21 | ] |
Lei Zhang | 461b634 | 2015-11-06 10:32:28 -0800 | [diff] [blame] | 22 | include_dirs = [ ".." ] |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 23 | if (pdf_enable_v8) { |
Tom Sepez | d87b20e | 2016-03-02 16:55:26 -0800 | [diff] [blame] | 24 | defines += [ "PDF_ENABLE_V8" ] |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 25 | } |
Tom Sepez | a8a39e2 | 2015-10-12 15:47:07 -0700 | [diff] [blame] | 26 | if (pdf_enable_xfa) { |
Tom Sepez | d87b20e | 2016-03-02 16:55:26 -0800 | [diff] [blame] | 27 | defines += [ "PDF_ENABLE_XFA" ] |
Tom Sepez | a8a39e2 | 2015-10-12 15:47:07 -0700 | [diff] [blame] | 28 | } |
Cary Clark | 399be5b | 2016-03-14 16:51:29 -0400 | [diff] [blame] | 29 | if (pdf_use_skia) { |
| 30 | defines += [ "PDF_ENABLE_SKIA" ] |
| 31 | } |
dan sinclair | 00d4064 | 2017-01-30 19:48:54 -0800 | [diff] [blame] | 32 | if (is_asan) { |
| 33 | defines += [ "PDF_ENABLE_ASAN" ] |
| 34 | } |
Henrique Nakashima | 95ea778 | 2017-07-11 16:42:43 -0400 | [diff] [blame] | 35 | |
| 36 | if (enable_callgrind) { |
| 37 | defines += [ "ENABLE_CALLGRIND" ] |
| 38 | } |
John Abd-El-Malek | ca6c0d3 | 2015-02-17 13:26:45 -0800 | [diff] [blame] | 39 | } |
| 40 | |
Tom Sepez | 65edf59 | 2014-11-13 17:04:15 -0800 | [diff] [blame] | 41 | executable("pdfium_test") { |
Tom Sepez | d831dc7 | 2015-10-19 16:04:22 -0700 | [diff] [blame] | 42 | testonly = true |
Tom Sepez | 65edf59 | 2014-11-13 17:04:15 -0800 | [diff] [blame] | 43 | sources = [ |
Tom Sepez | d87b20e | 2016-03-02 16:55:26 -0800 | [diff] [blame] | 44 | "pdfium_test.cc", |
Dan Sinclair | cb87682 | 2018-03-22 16:21:04 +0000 | [diff] [blame] | 45 | "pdfium_test_dump_helper.cc", |
| 46 | "pdfium_test_dump_helper.h", |
| 47 | "pdfium_test_event_helper.cc", |
| 48 | "pdfium_test_event_helper.h", |
| 49 | "pdfium_test_write_helper.cc", |
| 50 | "pdfium_test_write_helper.h", |
Tom Sepez | 65edf59 | 2014-11-13 17:04:15 -0800 | [diff] [blame] | 51 | ] |
| 52 | deps = [ |
Lei Zhang | 143959d | 2017-06-22 12:20:58 -0700 | [diff] [blame] | 53 | "../:image_diff", |
dsinclair | 685bb88 | 2016-04-20 07:32:39 -0700 | [diff] [blame] | 54 | "../:pdfium", |
| 55 | "../:test_support", |
brucedawson | 15bfe1b | 2016-04-27 15:28:41 -0700 | [diff] [blame] | 56 | "//build/win:default_exe_manifest", |
John Abd-El-Malek | b045ed2 | 2015-02-10 09:15:12 -0800 | [diff] [blame] | 57 | ] |
Lei Zhang | 360edeb | 2017-12-19 18:06:35 +0000 | [diff] [blame] | 58 | configs += [ ":pdfium_samples_config" ] |
| 59 | |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 60 | if (pdf_enable_v8) { |
Lei Zhang | 461b634 | 2015-11-06 10:32:28 -0800 | [diff] [blame] | 61 | deps += [ "//v8:v8_libplatform" ] |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 62 | include_dirs = [ |
| 63 | "//v8", |
| 64 | "//v8/include", |
| 65 | ] |
Jochen Eisinger | 7ed503d | 2015-12-10 14:38:06 +0100 | [diff] [blame] | 66 | configs += [ "//v8:external_startup_data" ] |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 67 | } |
caryclark | af177fe | 2016-11-16 10:10:03 -0800 | [diff] [blame] | 68 | if (pdf_use_skia || pdf_use_skia_paths) { |
Cary Clark | 399be5b | 2016-03-14 16:51:29 -0400 | [diff] [blame] | 69 | deps += [ "//skia" ] |
| 70 | } |
Tom Sepez | 65edf59 | 2014-11-13 17:04:15 -0800 | [diff] [blame] | 71 | } |