image format arg parsing for creator.c
[blender.git] / extern / libmv / SConscript
1 #!/usr/bin/python
2 import sys
3 import os
4
5 Import('env')
6
7 defs = []
8
9 cflags_libmv = Split(env['CFLAGS'])
10 ccflags_libmv = Split(env['CCFLAGS'])
11 cxxflags_libmv = Split(env['CXXFLAGS'])
12
13 defs.append('V3DLIB_ENABLE_SUITESPARSE')
14 defs.append('GOOGLE_GLOG_DLL_DECL=')
15
16 src = env.Glob("*.cpp")
17 src += env.Glob('libmv/image/*.cc')
18 src += env.Glob('libmv/multiview/*.cc')
19 src += env.Glob('libmv/numeric/*.cc')
20 src += env.Glob('libmv/simple_pipeline/*.cc')
21 src += env.Glob('libmv/tracking/*.cc')
22 src += env.Glob('third_party/fast/*.c')
23 src += env.Glob('third_party/gflags/*.cc')
24 src += env.Glob('third_party/ldl/Source/*.c')
25 src += env.Glob('third_party/ssba/Geometry/*.cpp')
26 src += env.Glob('third_party/ssba/Math/*.cpp')
27
28 incs = '. ../Eigen3'
29 incs += ' ' + env['BF_PNG_INC']
30 incs += ' ' + env['BF_ZLIB_INC']
31
32 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
33     incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog'
34     if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
35         incs += ' ./third_party/msinttypes'
36
37     src += ['./third_party/glog/src/logging.cc', './third_party/glog/src/raw_logging.cc', './third_party/glog/src/utilities.cc', './third_party/glog/src/vlog_is_on.cc']
38     src += ['./third_party/glog/src/windows/port.cc']
39
40     if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
41         cflags_libmv.append('/Od')
42         ccflags_libmv.append('/Od')
43         cxxflags_libmv.append('/Od')
44
45         if not env['BF_DEBUG']:
46             defs.append('NDEBUG')
47     else:
48         if not env['BF_DEBUG']:
49             cflags_libmv = Split(env['REL_CFLAGS'])
50             ccflags_libmv = Split(env['REL_CCFLAGS'])
51             cxxflags_libmv = Split(env['REL_CXXFLAGS'])
52 else:
53     src += env.Glob("third_party/glog/src/*.cc")
54     incs += ' ./third_party/glog/src'
55     if not env['BF_DEBUG']:
56         cflags_libmv = Split(env['REL_CFLAGS'])
57         ccflags_libmv = Split(env['REL_CCFLAGS'])
58         cxxflags_libmv = Split(env['REL_CXXFLAGS'])
59
60 incs += ' ./third_party/ssba ./third_party/ldl/Include ../colamd/Include'
61
62 env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137], compileflags=cflags_libmv, cc_compileflags=ccflags_libmv, cxx_compileflags=cxxflags_libmv )