blob: 0ee8b29e38009407ea2025f9da57bfa83dffd902 [file] [log] [blame]
Oliver Change67d2182016-02-16 11:42:07 -08001# Copyright 2016 The 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
5import("../../pdfium.gni")
6
7config("libfuzzer_config") {
8 defines = [
9 "PNG_PREFIX",
Oliver Change67d2182016-02-16 11:42:07 -080010 "PNG_USE_READ_MACROS",
11 ]
12 include_dirs = [ "../.." ]
13 if (pdf_enable_v8) {
14 defines += [ "PDF_ENABLE_V8" ]
15 }
16 if (pdf_enable_xfa) {
17 defines += [ "PDF_ENABLE_XFA" ]
18 }
19}
20
21if (pdf_enable_xfa) {
22 source_set("pdf_fm2js_fuzzer") {
23 testonly = true
24 sources = [
25 "pdf_fm2js_fuzzer.cc",
26 ]
27 deps = [
28 "//third_party/pdfium:pdfium",
29 ]
30 configs -= [ "//build/config/compiler:chromium_code" ]
31 configs += [
32 "//build/config/compiler:no_chromium_code",
33 ":libfuzzer_config",
34 ]
35 }
36 source_set("pdf_xml_fuzzer") {
37 testonly = true
38 sources = [
39 "pdf_xml_fuzzer.cc",
40 ]
41 deps = [
42 "//third_party/pdfium:pdfium",
43 ]
44 configs -= [ "//build/config/compiler:chromium_code" ]
45 configs += [
46 "//build/config/compiler:no_chromium_code",
47 ":libfuzzer_config",
48 ]
49 }
Oliver Chang238bfb72016-03-21 10:31:00 -070050}
51
52source_set("pdf_jpx_fuzzer") {
53 testonly = true
54 sources = [
55 "pdf_jpx_fuzzer.cc",
56 ]
57 deps = [
58 "//third_party/pdfium:pdfium",
59 ]
60 configs -= [ "//build/config/compiler:chromium_code" ]
61 configs += [
62 "//build/config/compiler:no_chromium_code",
63 ":libfuzzer_config",
64 ]
Oliver Change67d2182016-02-16 11:42:07 -080065}