fbb6ee36f8559eb96c291057c725f549bcce0259
[blender.git] / extern / libmv / SConscript
1 #!/usr/bin/python
2
3 # NOTE: This file is automatically generated by bundle.sh script
4 #       If you're doing changes in this file, please update template
5 #       in that script too
6
7 import sys
8 import os
9
10 Import('env')
11
12 defs = []
13
14 cflags_libmv = Split(env['CFLAGS'])
15 ccflags_libmv = Split(env['CCFLAGS'])
16 cxxflags_libmv = Split(env['CXXFLAGS'])
17
18 defs.append('V3DLIB_ENABLE_SUITESPARSE')
19 defs.append('GOOGLE_GLOG_DLL_DECL=')
20
21 src = env.Glob("*.cpp")
22 src += env.Glob('libmv/image/*.cc')
23 src += env.Glob('libmv/multiview/*.cc')
24 src += env.Glob('libmv/numeric/*.cc')
25 src += env.Glob('libmv/simple_pipeline/*.cc')
26 src += env.Glob('libmv/tracking/*.cc')
27 src += env.Glob('third_party/fast/*.c')
28 src += env.Glob('third_party/gflags/*.cc')
29 src += env.Glob('third_party/ldl/Source/*.c')
30 src += env.Glob('third_party/ssba/Geometry/*.cpp')
31 src += env.Glob('third_party/ssba/Math/*.cpp')
32
33 incs = '. ../Eigen3'
34 incs += ' ' + env['BF_PNG_INC']
35 incs += ' ' + env['BF_ZLIB_INC']
36
37 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
38     incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog'
39     if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
40         incs += ' ./third_party/msinttypes'
41
42     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']
43     src += ['./third_party/glog/src/windows/port.cc']
44
45     if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
46         cflags_libmv.append('/Od')
47         ccflags_libmv.append('/Od')
48         cxxflags_libmv.append('/Od')
49
50         if not env['BF_DEBUG']:
51             defs.append('NDEBUG')
52     else:
53         if not env['BF_DEBUG']:
54             cflags_libmv += Split(env['REL_CFLAGS'])
55             ccflags_libmv += Split(env['REL_CCFLAGS'])
56             cxxflags_libmv += Split(env['REL_CXXFLAGS'])
57 else:
58     src += env.Glob("third_party/glog/src/*.cc")
59     incs += ' ./third_party/glog/src'
60     if not env['BF_DEBUG']:
61         cflags_libmv += Split(env['REL_CFLAGS'])
62         ccflags_libmv += Split(env['REL_CCFLAGS'])
63         cxxflags_libmv += Split(env['REL_CXXFLAGS'])
64
65 incs += ' ./third_party/ssba ./third_party/ldl/Include ../colamd/Include'
66
67 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 )