BUILD.gn revision e6986e1e8d4a57987f47c215490cb080a65ee29a
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 5group("samples") { 6 deps = [ 7 ":pdfium_test", 8 ":pdfium_diff", 9 ] 10} 11 12config("pdfium_samples_config") { 13 defines = [ 14 "PNG_PREFIX", 15 "PNGPREFIX_H", 16 "PNG_USE_READ_MACROS", 17 ] 18} 19 20executable("pdfium_test") { 21 sources = [ 22 "image_diff_png.cc", 23 "pdfium_test.cc", 24 ] 25 deps = [ 26 "//third_party/pdfium", 27 "//v8:v8_libplatform", 28 ":fx_lpng", 29 ] 30 include_dirs = [ 31 "//v8", 32 "//v8/include", 33 ] 34 configs += [ ":pdfium_samples_config" ] 35} 36 37executable("pdfium_diff") { 38 sources = [ 39 "image_diff.cc", 40 "image_diff_png.cc", 41 "image_diff_png.h", 42 ] 43 deps = [ 44 "//third_party/pdfium", 45 ":fx_lpng", 46 ] 47 configs -= [ "//build/config/compiler:chromium_code" ] 48 configs += [ 49 ":pdfium_samples_config", 50 "//build/config/compiler:no_chromium_code", 51 ] 52} 53 54static_library("fx_lpng") { 55 sources = [ 56 "fx_lpng/include/fx_png.h", 57 "fx_lpng/src/fx_png.c", 58 "fx_lpng/src/fx_pngerror.c", 59 "fx_lpng/src/fx_pngget.c", 60 "fx_lpng/src/fx_pngmem.c", 61 "fx_lpng/src/fx_pngpread.c", 62 "fx_lpng/src/fx_pngread.c", 63 "fx_lpng/src/fx_pngrio.c", 64 "fx_lpng/src/fx_pngrtran.c", 65 "fx_lpng/src/fx_pngrutil.c", 66 "fx_lpng/src/fx_pngset.c", 67 "fx_lpng/src/fx_pngtrans.c", 68 "fx_lpng/src/fx_pngwio.c", 69 "fx_lpng/src/fx_pngwrite.c", 70 "fx_lpng/src/fx_pngwtran.c", 71 "fx_lpng/src/fx_pngwutil.c", 72 ] 73 include_dirs = [ 74 "../core/src/fxcodec/fx_zlib/include/", 75 ] 76 configs += [ ":pdfium_samples_config" ] 77}