From 34bb6c58fe60206a08dc0a1f37b7cfe83e8c762c Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 5 Nov 2015 18:39:40 -0800 Subject: Fix all relative includes to third_party. - In non-standalone builds, use the provided jpeg library. - Run gn format over all the GN files. - Also roll DEPS for buildtools to c2f2598. BUG=541704 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425153006 . --- samples/BUILD.gn | 16 ++++++---------- samples/fx_lpng/lpng_v163/pngstruct.h | 2 +- samples/image_diff.cc | 4 ++-- samples/image_diff_png.cc | 4 ++-- samples/pdfium_test.cc | 2 +- samples/samples.gyp | 5 ++--- 6 files changed, 14 insertions(+), 19 deletions(-) (limited to 'samples') diff --git a/samples/BUILD.gn b/samples/BUILD.gn index f3f6bc1a10..73683c4bbc 100644 --- a/samples/BUILD.gn +++ b/samples/BUILD.gn @@ -18,10 +18,9 @@ config("pdfium_samples_config") { "PNGPREFIX_H", "PNG_USE_READ_MACROS", ] + include_dirs = [ ".." ] if (pdf_enable_v8) { - defines += [ - "PDF_ENABLE_V8", - ] + defines += [ "PDF_ENABLE_V8" ] } } @@ -34,6 +33,7 @@ executable("pdfium_test") { deps = [ "//third_party/pdfium:pdfium", "//third_party/pdfium:test_support", + # Regardless of whether the library ships against system freetype, # always link this binary against the bundled one for consistency # of results across platforms. @@ -41,9 +41,7 @@ executable("pdfium_test") { ":fx_lpng", ] if (pdf_enable_v8) { - deps += [ - "//v8:v8_libplatform", - ] + deps += [ "//v8:v8_libplatform" ] include_dirs = [ "//v8", "//v8/include", @@ -90,8 +88,6 @@ static_library("fx_lpng") { "fx_lpng/src/fx_pngwtran.c", "fx_lpng/src/fx_pngwutil.c", ] - include_dirs = [ - "../core/src/fxcodec/fx_zlib/include/", - ] + include_dirs = [ "../core/src/fxcodec/fx_zlib/include/" ] configs += [ ":pdfium_samples_config" ] -} \ No newline at end of file +} diff --git a/samples/fx_lpng/lpng_v163/pngstruct.h b/samples/fx_lpng/lpng_v163/pngstruct.h index 25355c4012..87adaa1a6b 100644 --- a/samples/fx_lpng/lpng_v163/pngstruct.h +++ b/samples/fx_lpng/lpng_v163/pngstruct.h @@ -28,7 +28,7 @@ /* We must ensure that zlib uses 'const' in declarations. */ # define ZLIB_CONST #endif -#include "../../../third_party/zlib_v128/zlib.h" +#include "third_party/zlib_v128/zlib.h" #ifdef const /* zlib.h sometimes #defines const to nothing, undo this. */ # undef const diff --git a/samples/image_diff.cc b/samples/image_diff.cc index f10bd31085..88a3956d09 100644 --- a/samples/image_diff.cc +++ b/samples/image_diff.cc @@ -19,9 +19,9 @@ #include #include -#include "../third_party/base/logging.h" -#include "../third_party/base/numerics/safe_conversions.h" #include "image_diff_png.h" +#include "third_party/base/logging.h" +#include "third_party/base/numerics/safe_conversions.h" #if defined(OS_WIN) #include diff --git a/samples/image_diff_png.cc b/samples/image_diff_png.cc index 4ece285aa7..34bff56ac9 100644 --- a/samples/image_diff_png.cc +++ b/samples/image_diff_png.cc @@ -16,9 +16,9 @@ #include -#include "../third_party/base/logging.h" -#include "../third_party/zlib_v128/zlib.h" #include "fx_lpng/include/fx_png.h" +#include "third_party/base/logging.h" +#include "third_party/zlib_v128/zlib.h" namespace image_diff_png { diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc index 102f59d917..25f543a3a4 100644 --- a/samples/pdfium_test.cc +++ b/samples/pdfium_test.cc @@ -24,7 +24,7 @@ #ifdef PDF_ENABLE_V8 #include "v8/include/libplatform/libplatform.h" #include "v8/include/v8.h" -#endif +#endif // PDF_ENABLE_V8 #ifdef _WIN32 #define snprintf _snprintf diff --git a/samples/samples.gyp b/samples/samples.gyp index 35b62b7fcf..3dc9a45cae 100644 --- a/samples/samples.gyp +++ b/samples/samples.gyp @@ -13,7 +13,9 @@ 'PNG_USE_READ_MACROS', ], 'include_dirs': [ + # This is implicit in GN. '<(DEPTH)', + '..', ], 'conditions': [ ['pdf_enable_v8==1', { @@ -66,9 +68,6 @@ '../pdfium.gyp:pdfium', '../third_party/third_party.gyp:pdfium_base', ], - 'include_dirs': [ - '../../', - ], 'sources': [ 'image_diff.cc', 'image_diff_png.h', -- cgit v1.2.3