summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-17 17:17:14 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-17 17:17:14 -0700
commitc7a17bf9cdb0d646aa8b653e6ab2678a1837ed6a (patch)
treea63eadd4ebea416b8a400f1fc7e3d103c665a0e4
parentff8347a4b16f000be628c5e10d03a1e1c17537eb (diff)
downloadpdfium-c7a17bf9cdb0d646aa8b653e6ab2678a1837ed6a.tar.xz
Move libopenjpeg to third_party/
We get to delete a whole bunch of fx_foo.c files that did nothing but #include "foo.c" after defining _CRT_SECURE_NO_WARNINGS. Do this from the .gyp/.gn files instead. Also sort some "config"s in .gn file. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1185373010.
-rw-r--r--BUILD.gn23
-rw-r--r--core/src/fxcodec/codec/codec_int.h2
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpx_opj.cpp2
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h16
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_event.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_image.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c9
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c9
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_t1_generate_luts.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c10
-rw-r--r--core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c10
-rw-r--r--pdfium.gyp23
-rw-r--r--third_party/BUILD.gn36
-rw-r--r--third_party/libopenjpeg20/CMakeLists.txt (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/CMakeLists.txt)0
-rw-r--r--third_party/libopenjpeg20/bio.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/bio.c)0
-rw-r--r--third_party/libopenjpeg20/bio.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/bio.h)0
-rw-r--r--third_party/libopenjpeg20/cio.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.c)0
-rw-r--r--third_party/libopenjpeg20/cio.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.h)0
-rw-r--r--third_party/libopenjpeg20/dwt.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c)0
-rw-r--r--third_party/libopenjpeg20/dwt.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.h)0
-rw-r--r--third_party/libopenjpeg20/event.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/event.c)0
-rw-r--r--third_party/libopenjpeg20/event.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/event.h)0
-rw-r--r--third_party/libopenjpeg20/function_list.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.c)0
-rw-r--r--third_party/libopenjpeg20/function_list.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.h)0
-rw-r--r--third_party/libopenjpeg20/image.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c)0
-rw-r--r--third_party/libopenjpeg20/image.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.h)0
-rw-r--r--third_party/libopenjpeg20/indexbox_manager.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/indexbox_manager.h)0
-rw-r--r--third_party/libopenjpeg20/invert.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/invert.c)0
-rw-r--r--third_party/libopenjpeg20/invert.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/invert.h)0
-rw-r--r--third_party/libopenjpeg20/j2k.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.c)0
-rw-r--r--third_party/libopenjpeg20/j2k.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.h)0
-rw-r--r--third_party/libopenjpeg20/jp2.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/jp2.c)0
-rw-r--r--third_party/libopenjpeg20/jp2.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/jp2.h)0
-rw-r--r--third_party/libopenjpeg20/mct.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.c)0
-rw-r--r--third_party/libopenjpeg20/mct.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.h)0
-rw-r--r--third_party/libopenjpeg20/mqc.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c)0
-rw-r--r--third_party/libopenjpeg20/mqc.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.h)0
-rw-r--r--third_party/libopenjpeg20/openjpeg.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.c)0
-rw-r--r--third_party/libopenjpeg20/openjpeg.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h)0
-rw-r--r--third_party/libopenjpeg20/opj_clock.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_clock.c)0
-rw-r--r--third_party/libopenjpeg20/opj_clock.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_clock.h)0
-rw-r--r--third_party/libopenjpeg20/opj_codec.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_codec.h)0
-rw-r--r--third_party/libopenjpeg20/opj_config.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config.h)0
-rw-r--r--third_party/libopenjpeg20/opj_config.h.cmake.in (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config.h.cmake.in)0
-rw-r--r--third_party/libopenjpeg20/opj_config_private.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config_private.h)0
-rw-r--r--third_party/libopenjpeg20/opj_includes.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_includes.h)0
-rw-r--r--third_party/libopenjpeg20/opj_intmath.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_intmath.h)0
-rw-r--r--third_party/libopenjpeg20/opj_inttypes.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_inttypes.h)0
-rw-r--r--third_party/libopenjpeg20/opj_malloc.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_malloc.h)0
-rw-r--r--third_party/libopenjpeg20/opj_stdint.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_stdint.h)0
-rw-r--r--third_party/libopenjpeg20/pi.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/pi.c)0
-rw-r--r--third_party/libopenjpeg20/pi.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/pi.h)0
-rw-r--r--third_party/libopenjpeg20/raw.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/raw.c)0
-rw-r--r--third_party/libopenjpeg20/raw.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/raw.h)0
-rw-r--r--third_party/libopenjpeg20/t1.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.c)0
-rw-r--r--third_party/libopenjpeg20/t1.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.h)0
-rw-r--r--third_party/libopenjpeg20/t1_generate_luts.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1_generate_luts.c)0
-rw-r--r--third_party/libopenjpeg20/t1_luts.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1_luts.h)0
-rw-r--r--third_party/libopenjpeg20/t2.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.c)0
-rw-r--r--third_party/libopenjpeg20/t2.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.h)0
-rw-r--r--third_party/libopenjpeg20/tcd.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.c)0
-rw-r--r--third_party/libopenjpeg20/tcd.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.h)0
-rw-r--r--third_party/libopenjpeg20/tgt.c (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.c)0
-rw-r--r--third_party/libopenjpeg20/tgt.h (renamed from core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.h)0
-rw-r--r--third_party/third_party.gyp28
80 files changed, 65 insertions, 283 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 97a475d22f..76e05d6360 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -338,6 +338,7 @@ static_library("fxcodec") {
deps = [
"third_party:fx_lcms2",
"third_party:fx_libjpeg",
+ "third_party:fx_libopenjpeg",
]
sources = [
"core/include/fxcodec/fx_codec.h",
@@ -352,28 +353,6 @@ static_library("fxcodec") {
"core/src/fxcodec/codec/fx_codec_jbig_enc.cpp",
"core/src/fxcodec/codec/fx_codec_jpeg.cpp",
"core/src/fxcodec/codec/fx_codec_jpx_opj.cpp",
- "core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_event.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_image.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c",
- "core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c",
"core/src/fxcodec/fx_zlib/include/fx_zlib.h",
"core/src/fxcodec/fx_zlib/src/fx_zlib_adler32.c",
"core/src/fxcodec/fx_zlib/src/fx_zlib_compress.c",
diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h
index 1c70c12333..d0d969cddc 100644
--- a/core/src/fxcodec/codec/codec_int.h
+++ b/core/src/fxcodec/codec/codec_int.h
@@ -10,9 +10,9 @@
#include <limits.h>
#include <list>
+#include "../../../../third_party/libopenjpeg20/openjpeg.h" // For OPJ_SIZE_T.
#include "../../../include/fxcodec/fx_codec.h"
#include "../jbig2/JBig2_Context.h"
-#include "../fx_libopenjpeg/libopenjpeg20/openjpeg.h" // For OPJ_SIZE_T.
class CCodec_BasicModule : public ICodec_BasicModule
{
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 4457f1835a..8b1759e3ad 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -7,8 +7,8 @@
#include <algorithm>
#include <limits>
+#include "../../../../third_party/libopenjpeg20/openjpeg.h"
#include "../../../include/fxcodec/fx_codec.h"
-#include "../fx_libopenjpeg/libopenjpeg20/openjpeg.h"
#include "../lcms2/fx_lcms2.h"
#include "codec_int.h"
diff --git a/core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h b/core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h
deleted file mode 100644
index 5725a57e75..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef CORE_SRC_FXCODEC_FX_LIBOPENJPEG_INCLUDE_FX_OPENJPEG_H_
-#define CORE_SRC_FXCODEC_FX_LIBOPENJPEG_INCLUDE_FX_OPENJPEG_H_
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-
-#include "../libopenjpeg20/openjpeg.h"
-
-#endif // CORE_SRC_FXCODEC_FX_LIBOPENJPEG_INCLUDE_FX_OPENJPEG_H_
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c
deleted file mode 100644
index 57ed6f83a5..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/bio.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c
deleted file mode 100644
index 5f70ee540c..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/cio.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c
deleted file mode 100644
index 2dd428f1b7..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/dwt.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_event.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_event.c
deleted file mode 100644
index a7d9bcae10..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_event.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/event.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c
deleted file mode 100644
index 499b1419dd..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/function_list.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_image.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_image.c
deleted file mode 100644
index 46b0faab35..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_image.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/image.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c
deleted file mode 100644
index daa89ab2c3..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/invert.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c
deleted file mode 100644
index c3ae6d42d6..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/j2k.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c
deleted file mode 100644
index 0aa62a05ba..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c
deleted file mode 100644
index 0aa62a05ba..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c
deleted file mode 100644
index d2a3861a98..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/mct.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c
deleted file mode 100644
index bda851de93..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/mqc.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c
deleted file mode 100644
index 8addb90bb9..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/openjpeg.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c
deleted file mode 100644
index 4271dd0b86..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/jp2.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c
deleted file mode 100644
index 1aed471673..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/opj_clock.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c
deleted file mode 100644
index 034a1208bb..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/pi.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c
deleted file mode 100644
index c475df2b65..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/raw.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c
deleted file mode 100644
index ada8ae22ac..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/t1.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_t1_generate_luts.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_t1_generate_luts.c
deleted file mode 100644
index a4b8890154..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_t1_generate_luts.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/t1_generate_luts.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c
deleted file mode 100644
index 4e5ca50783..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/t2.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c
deleted file mode 100644
index 8d575701ec..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/tcd.c"
diff --git a/core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c b/core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c
deleted file mode 100644
index 283dc54b79..0000000000
--- a/core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifdef _MSC_VER
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-#include "../libopenjpeg20/tgt.c"
diff --git a/pdfium.gyp b/pdfium.gyp
index 8b19c83d08..54ce6ade25 100644
--- a/pdfium.gyp
+++ b/pdfium.gyp
@@ -327,6 +327,7 @@
'dependencies': [
'third_party/third_party.gyp:fx_lcms2',
'third_party/third_party.gyp:fx_libjpeg',
+ 'third_party/third_party.gyp:fx_libopenjpeg',
],
'ldflags': [ '-L<(PRODUCT_DIR)',],
'sources': [
@@ -342,28 +343,6 @@
'core/src/fxcodec/codec/fx_codec_jbig_enc.cpp',
'core/src/fxcodec/codec/fx_codec_jpeg.cpp',
'core/src/fxcodec/codec/fx_codec_jpx_opj.cpp',
- 'core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_event.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_image.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c',
- 'core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c',
'core/src/fxcodec/fx_zlib/include/fx_zlib.h',
'core/src/fxcodec/fx_zlib/src/fx_zlib_adler32.c',
'core/src/fxcodec/fx_zlib/src/fx_zlib_compress.c',
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index 11da543683..666afe557d 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -13,8 +13,8 @@ group("third_party") {
source_set("bigint") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
- "//third_party/pdfium:pdfium_config",
"//build/config/compiler:no_chromium_code",
+ "//third_party/pdfium:pdfium_config",
]
sources = [
"bigint/BigInteger.cc",
@@ -33,8 +33,8 @@ source_set("bigint") {
source_set("freetype") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
- "//third_party/pdfium:pdfium_config",
"//build/config/compiler:no_chromium_code",
+ "//third_party/pdfium:pdfium_config",
]
defines = [ "FT2_BUILD_LIBRARY" ]
sources = [
@@ -196,11 +196,41 @@ source_set("fx_libjpeg") {
]
}
-source_set("pdfium_base") {
+source_set("fx_libopenjpeg") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
+ "//build/config/compiler:no_chromium_code",
"//third_party/pdfium:pdfium_config",
+ ]
+ defines = [ "_CRT_SECURE_NO_WARNINGS" ]
+ sources = [
+ "libopenjpeg20/bio.c",
+ "libopenjpeg20/cio.c",
+ "libopenjpeg20/dwt.c",
+ "libopenjpeg20/event.c",
+ "libopenjpeg20/function_list.c",
+ "libopenjpeg20/image.c",
+ "libopenjpeg20/invert.c",
+ "libopenjpeg20/j2k.c",
+ "libopenjpeg20/jp2.c",
+ "libopenjpeg20/mct.c",
+ "libopenjpeg20/mqc.c",
+ "libopenjpeg20/openjpeg.c",
+ "libopenjpeg20/opj_clock.c",
+ "libopenjpeg20/pi.c",
+ "libopenjpeg20/raw.c",
+ "libopenjpeg20/t1.c",
+ "libopenjpeg20/t2.c",
+ "libopenjpeg20/tcd.c",
+ "libopenjpeg20/tgt.c",
+ ]
+}
+
+source_set("pdfium_base") {
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
"//build/config/compiler:no_chromium_code",
+ "//third_party/pdfium:pdfium_config",
]
sources = [
"base/logging.h",
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/CMakeLists.txt b/third_party/libopenjpeg20/CMakeLists.txt
index 7f16834660..7f16834660 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/CMakeLists.txt
+++ b/third_party/libopenjpeg20/CMakeLists.txt
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/bio.c b/third_party/libopenjpeg20/bio.c
index 3ce6492753..3ce6492753 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/bio.c
+++ b/third_party/libopenjpeg20/bio.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/bio.h b/third_party/libopenjpeg20/bio.h
index fba2428476..fba2428476 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/bio.h
+++ b/third_party/libopenjpeg20/bio.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.c b/third_party/libopenjpeg20/cio.c
index c455bf7711..c455bf7711 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.c
+++ b/third_party/libopenjpeg20/cio.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.h b/third_party/libopenjpeg20/cio.h
index 6dfa5bb847..6dfa5bb847 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/cio.h
+++ b/third_party/libopenjpeg20/cio.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c b/third_party/libopenjpeg20/dwt.c
index bea4574257..bea4574257 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c
+++ b/third_party/libopenjpeg20/dwt.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.h b/third_party/libopenjpeg20/dwt.h
index f8b57bc0c7..f8b57bc0c7 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.h
+++ b/third_party/libopenjpeg20/dwt.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/event.c b/third_party/libopenjpeg20/event.c
index b6034b42d0..b6034b42d0 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/event.c
+++ b/third_party/libopenjpeg20/event.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/event.h b/third_party/libopenjpeg20/event.h
index 88e0395b4f..88e0395b4f 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/event.h
+++ b/third_party/libopenjpeg20/event.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.c b/third_party/libopenjpeg20/function_list.c
index b9a8b4a7d2..b9a8b4a7d2 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.c
+++ b/third_party/libopenjpeg20/function_list.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.h b/third_party/libopenjpeg20/function_list.h
index 749ad9e457..749ad9e457 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/function_list.h
+++ b/third_party/libopenjpeg20/function_list.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c b/third_party/libopenjpeg20/image.c
index 8e68668e42..8e68668e42 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c
+++ b/third_party/libopenjpeg20/image.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.h b/third_party/libopenjpeg20/image.h
index e0e2772d40..e0e2772d40 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.h
+++ b/third_party/libopenjpeg20/image.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/indexbox_manager.h b/third_party/libopenjpeg20/indexbox_manager.h
index ec5525f530..ec5525f530 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/indexbox_manager.h
+++ b/third_party/libopenjpeg20/indexbox_manager.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/invert.c b/third_party/libopenjpeg20/invert.c
index 4c1ee780d3..4c1ee780d3 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/invert.c
+++ b/third_party/libopenjpeg20/invert.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/invert.h b/third_party/libopenjpeg20/invert.h
index 2fae8e54bd..2fae8e54bd 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/invert.h
+++ b/third_party/libopenjpeg20/invert.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.c b/third_party/libopenjpeg20/j2k.c
index 7b4bc58a6c..7b4bc58a6c 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.c
+++ b/third_party/libopenjpeg20/j2k.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.h b/third_party/libopenjpeg20/j2k.h
index 10e22aa6b4..10e22aa6b4 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.h
+++ b/third_party/libopenjpeg20/j2k.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/jp2.c b/third_party/libopenjpeg20/jp2.c
index aafbe199d6..aafbe199d6 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/jp2.c
+++ b/third_party/libopenjpeg20/jp2.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/jp2.h b/third_party/libopenjpeg20/jp2.h
index 1e41fb6f6d..1e41fb6f6d 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/jp2.h
+++ b/third_party/libopenjpeg20/jp2.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.c b/third_party/libopenjpeg20/mct.c
index a0da099660..a0da099660 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.c
+++ b/third_party/libopenjpeg20/mct.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.h b/third_party/libopenjpeg20/mct.h
index 1c1f4d0c4d..1c1f4d0c4d 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mct.h
+++ b/third_party/libopenjpeg20/mct.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c b/third_party/libopenjpeg20/mqc.c
index 075594b939..075594b939 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.c
+++ b/third_party/libopenjpeg20/mqc.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.h b/third_party/libopenjpeg20/mqc.h
index 69a2d46029..69a2d46029 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/mqc.h
+++ b/third_party/libopenjpeg20/mqc.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.c b/third_party/libopenjpeg20/openjpeg.c
index 4907c0cf45..4907c0cf45 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.c
+++ b/third_party/libopenjpeg20/openjpeg.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h b/third_party/libopenjpeg20/openjpeg.h
index 4a8e75ce5a..4a8e75ce5a 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/openjpeg.h
+++ b/third_party/libopenjpeg20/openjpeg.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_clock.c b/third_party/libopenjpeg20/opj_clock.c
index 0df99ef04d..0df99ef04d 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_clock.c
+++ b/third_party/libopenjpeg20/opj_clock.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_clock.h b/third_party/libopenjpeg20/opj_clock.h
index 6f5168b572..6f5168b572 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_clock.h
+++ b/third_party/libopenjpeg20/opj_clock.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_codec.h b/third_party/libopenjpeg20/opj_codec.h
index 6bd791fa7a..6bd791fa7a 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_codec.h
+++ b/third_party/libopenjpeg20/opj_codec.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config.h b/third_party/libopenjpeg20/opj_config.h
index 37bc9ba3c3..37bc9ba3c3 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config.h
+++ b/third_party/libopenjpeg20/opj_config.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config.h.cmake.in b/third_party/libopenjpeg20/opj_config.h.cmake.in
index 5f762ca3da..5f762ca3da 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config.h.cmake.in
+++ b/third_party/libopenjpeg20/opj_config.h.cmake.in
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config_private.h b/third_party/libopenjpeg20/opj_config_private.h
index 7d7e3ea463..7d7e3ea463 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_config_private.h
+++ b/third_party/libopenjpeg20/opj_config_private.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_includes.h b/third_party/libopenjpeg20/opj_includes.h
index e3d4686488..e3d4686488 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_includes.h
+++ b/third_party/libopenjpeg20/opj_includes.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_intmath.h b/third_party/libopenjpeg20/opj_intmath.h
index 4e299469de..4e299469de 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_intmath.h
+++ b/third_party/libopenjpeg20/opj_intmath.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_inttypes.h b/third_party/libopenjpeg20/opj_inttypes.h
index e74aed6a17..e74aed6a17 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_inttypes.h
+++ b/third_party/libopenjpeg20/opj_inttypes.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_malloc.h b/third_party/libopenjpeg20/opj_malloc.h
index 5007b0c9e2..5007b0c9e2 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_malloc.h
+++ b/third_party/libopenjpeg20/opj_malloc.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_stdint.h b/third_party/libopenjpeg20/opj_stdint.h
index b8556a1938..b8556a1938 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_stdint.h
+++ b/third_party/libopenjpeg20/opj_stdint.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/pi.c b/third_party/libopenjpeg20/pi.c
index 393a1e5540..393a1e5540 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/pi.c
+++ b/third_party/libopenjpeg20/pi.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/pi.h b/third_party/libopenjpeg20/pi.h
index f239679f5b..f239679f5b 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/pi.h
+++ b/third_party/libopenjpeg20/pi.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/raw.c b/third_party/libopenjpeg20/raw.c
index 2498761c42..2498761c42 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/raw.c
+++ b/third_party/libopenjpeg20/raw.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/raw.h b/third_party/libopenjpeg20/raw.h
index 572c666176..572c666176 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/raw.h
+++ b/third_party/libopenjpeg20/raw.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.c b/third_party/libopenjpeg20/t1.c
index 8cb230f48e..8cb230f48e 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.c
+++ b/third_party/libopenjpeg20/t1.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.h b/third_party/libopenjpeg20/t1.h
index 3bc0ad9ea7..3bc0ad9ea7 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.h
+++ b/third_party/libopenjpeg20/t1.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1_generate_luts.c b/third_party/libopenjpeg20/t1_generate_luts.c
index 1997d39977..1997d39977 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1_generate_luts.c
+++ b/third_party/libopenjpeg20/t1_generate_luts.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1_luts.h b/third_party/libopenjpeg20/t1_luts.h
index 37776b65a1..37776b65a1 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1_luts.h
+++ b/third_party/libopenjpeg20/t1_luts.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.c b/third_party/libopenjpeg20/t2.c
index 6f0ac91569..6f0ac91569 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.c
+++ b/third_party/libopenjpeg20/t2.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.h b/third_party/libopenjpeg20/t2.h
index 931141e057..931141e057 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.h
+++ b/third_party/libopenjpeg20/t2.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.c b/third_party/libopenjpeg20/tcd.c
index f62312027d..f62312027d 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.c
+++ b/third_party/libopenjpeg20/tcd.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.h b/third_party/libopenjpeg20/tcd.h
index 9bef0fe7d9..9bef0fe7d9 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.h
+++ b/third_party/libopenjpeg20/tcd.h
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.c b/third_party/libopenjpeg20/tgt.c
index 6143c08a65..6143c08a65 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.c
+++ b/third_party/libopenjpeg20/tgt.c
diff --git a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.h b/third_party/libopenjpeg20/tgt.h
index 3d152f8a90..3d152f8a90 100644
--- a/core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tgt.h
+++ b/third_party/libopenjpeg20/tgt.h
diff --git a/third_party/third_party.gyp b/third_party/third_party.gyp
index 6dbff565a4..a385036e49 100644
--- a/third_party/third_party.gyp
+++ b/third_party/third_party.gyp
@@ -200,6 +200,34 @@
],
},
{
+ 'target_name': 'fx_libopenjpeg',
+ 'type': 'static_library',
+ 'defines': [
+ '_CRT_SECURE_NO_WARNINGS',
+ ],
+ 'sources': [
+ 'libopenjpeg20/bio.c',
+ 'libopenjpeg20/cio.c',
+ 'libopenjpeg20/dwt.c',
+ 'libopenjpeg20/event.c',
+ 'libopenjpeg20/function_list.c',
+ 'libopenjpeg20/image.c',
+ 'libopenjpeg20/invert.c',
+ 'libopenjpeg20/j2k.c',
+ 'libopenjpeg20/jp2.c',
+ 'libopenjpeg20/mct.c',
+ 'libopenjpeg20/mqc.c',
+ 'libopenjpeg20/openjpeg.c',
+ 'libopenjpeg20/opj_clock.c',
+ 'libopenjpeg20/pi.c',
+ 'libopenjpeg20/raw.c',
+ 'libopenjpeg20/t1.c',
+ 'libopenjpeg20/t2.c',
+ 'libopenjpeg20/tcd.c',
+ 'libopenjpeg20/tgt.c',
+ ],
+ },
+ {
'target_name': 'pdfium_base',
'type': 'none',
'sources': [