openjpeg contained a C file with a main() function, user reported it was overriding...
[blender.git] / extern / libopenjpeg / SConscript
1 #!/usr/bin/python
2
3 import sys
4
5 Import('env')
6
7 sources = env.Glob('*.c')
8
9 # This file contains a main() - can override blenders
10 sources.remove('t1_generate_luts.c')
11
12 incs = '.'
13 flags = []
14 defs = []
15
16 if env['OURPLATFORM'] == 'win32-vc':
17         flags = []
18         defs.append('OPJ_STATIC')
19 else:
20         flags = ['-Wall', '-O3', '-ffast-math', '-std=c99']
21
22 oj_env = env.Clone()
23 if not env['OURPLATFORM'] == 'win32-vc':
24         oj_env.Replace(CCFLAGS = '')
25         oj_env.Replace(BF_DEBUG_FLAGS = '')
26
27 oj_env.BlenderLib ( libname='extern_openjpeg', 
28                     sources=sources, includes=Split(incs),
29                     defines=defs,
30                     libtype=['core','intern','player'],
31                     priority=[300, 300, 300], compileflags = flags)