Allow proper compiling of libjpeg for windows.

This expands on #777 to work with jconfig.h properly.

To facilitate these operations, a new macro was added for doing compile tests.

Note that this commit does NOT bring in the other files associated with this version of libjpeg.

At some point, it would be desirable to automatically get the files as part of the cmake configuration step, similar to ffmpeg.
This commit is contained in:
Jason Felds
2015-09-13 13:10:58 -04:00
parent 34ba6e37c4
commit 68b3620bac
12 changed files with 221 additions and 141 deletions
+5 -13
View File
@@ -7,28 +7,20 @@
#include <setjmp.h>
extern "C" {
#include "jpeglib.h"
#include "jerror.h"
}
#if defined(WIN32) && !defined(__MINGW32__)
// work around namespace bugs in win32/libjpeg:
#define XMD_H
#undef FAR
#include "jpeglib.h"
#include "jerror.h"
#if defined(_MSC_VER)
#pragma comment(lib, "jpeg.lib")
#pragma warning(disable: 4611) /* interaction between '_setjmp' and C++ object destruction is non-portable */
#endif
#else
extern "C" {
#if defined(MACOSX)
#include <../extern/libjpeg/jpeglib.h>
#include <../extern/libjpeg/jerror.h>
#else
#include "jpeglib.h"
#include "jerror.h"
#endif
}
#endif
struct my_jpeg_error_mgr