* make sure openjpeg stuff compiles and links properly.
- since we use this only as statically linked, I took out some confusing #ifdefs.
This commit is contained in:
7
extern/libopenjpeg/SConscript
vendored
7
extern/libopenjpeg/SConscript
vendored
@@ -6,9 +6,12 @@ Import('env')
|
||||
|
||||
sources = env.Glob('*.c')
|
||||
incs = '.'
|
||||
flags = []
|
||||
defs = []
|
||||
|
||||
if env['OURPLATFORM'] == 'win32-vc':
|
||||
flags = []
|
||||
defs.append('OPJ_STATIC')
|
||||
else:
|
||||
flags = ['-Wall', '-O3', '-ffast-math', '-std=c99']
|
||||
|
||||
@@ -19,6 +22,6 @@ if not env['OURPLATFORM'] == 'win32-vc':
|
||||
|
||||
oj_env.BlenderLib ( libname='extern_openjpeg',
|
||||
sources=sources, includes=Split(incs),
|
||||
defines=[],
|
||||
defines=defs,
|
||||
libtype=['core','intern','player'],
|
||||
priority=[10, 10, 300], compileflags = flags)
|
||||
priority=[300, 300, 300], compileflags = flags)
|
||||
|
17
extern/libopenjpeg/openjpeg.h
vendored
17
extern/libopenjpeg/openjpeg.h
vendored
@@ -40,25 +40,8 @@
|
||||
==========================================================
|
||||
*/
|
||||
|
||||
#if defined(OPJ_STATIC) || !(defined(WIN32) || defined(__WIN32__))
|
||||
#define OPJ_API
|
||||
#define OPJ_CALLCONV
|
||||
#else
|
||||
#define OPJ_CALLCONV __stdcall
|
||||
/*
|
||||
The following ifdef block is the standard way of creating macros which make exporting
|
||||
from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
|
||||
symbol defined on the command line. this symbol should not be defined on any project
|
||||
that uses this DLL. This way any other project whose source files include this file see
|
||||
OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols
|
||||
defined with this macro as being exported.
|
||||
*/
|
||||
#ifdef OPJ_EXPORTS
|
||||
#define OPJ_API __declspec(dllexport)
|
||||
#else
|
||||
#define OPJ_API __declspec(dllimport)
|
||||
#endif /* OPJ_EXPORTS */
|
||||
#endif /* !OPJ_STATIC || !WIN32 */
|
||||
|
||||
#ifndef __cplusplus
|
||||
#if defined(HAVE_STDBOOL_H)
|
||||
|
Reference in New Issue
Block a user