diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-13 02:17:37 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-13 02:17:37 +0400 |
commit | 32faec1a53fdc557dd7c74465d9d1d0c0c17cdb0 (patch) | |
tree | 60bf3329883052ce7b8cf7ad95c491fdcbf666ae /extern/libmv/SConscript | |
parent | 5c2355d3640618084d326e7f09bd83e118251ea9 (diff) |
Remplace bunch of annoying ifdefs in tracking.c with a libmv-capi_stub.cc
Makes code in tracking.cc much easier to understand and modify,
without worring to breck compulation with Libmv disabled.
It is still possible compilation will break due to libmv-capi
changes, but that's not happening so much often.
Diffstat (limited to 'extern/libmv/SConscript')
-rw-r--r-- | extern/libmv/SConscript | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/extern/libmv/SConscript b/extern/libmv/SConscript index d0015db42d7..ec616ff2adf 100644 --- a/extern/libmv/SConscript +++ b/extern/libmv/SConscript @@ -11,32 +11,37 @@ Import('env') defs = [] -defs.append('GOOGLE_GLOG_DLL_DECL=') - -src = env.Glob("*.cpp") -src += env.Glob('libmv/image/*.cc') -src += env.Glob('libmv/multiview/*.cc') -src += env.Glob('libmv/numeric/*.cc') -src += env.Glob('libmv/simple_pipeline/*.cc') -src += env.Glob('libmv/tracking/*.cc') -src += env.Glob('third_party/fast/*.c') -src += env.Glob('third_party/gflags/*.cc') - -incs = '. ../Eigen3 third_party/ceres/include' -incs += ' ' + env['BF_PNG_INC'] -incs += ' ' + env['BF_ZLIB_INC'] - -if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): - incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog' - if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): - incs += ' ./third_party/msinttypes' - - 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'] - src += ['./third_party/glog/src/windows/port.cc'] +if env['WITH_BF_LIBMV']: + defs.append('GOOGLE_GLOG_DLL_DECL=') + defs.append('WITH_LIBMV') + + src = env.Glob("libmv-capi.cc") + src += env.Glob('libmv/image/*.cc') + src += env.Glob('libmv/multiview/*.cc') + src += env.Glob('libmv/numeric/*.cc') + src += env.Glob('libmv/simple_pipeline/*.cc') + src += env.Glob('libmv/tracking/*.cc') + src += env.Glob('third_party/fast/*.c') + src += env.Glob('third_party/gflags/*.cc') + + incs = '. ../Eigen3 third_party/ceres/include' + incs += ' ' + env['BF_PNG_INC'] + incs += ' ' + env['BF_ZLIB_INC'] + + if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): + incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog' + if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): + incs += ' ./third_party/msinttypes' + + 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'] + src += ['./third_party/glog/src/windows/port.cc'] + else: + src += env.Glob("third_party/glog/src/*.cc") + incs += ' ./third_party/glog/src' else: - src += env.Glob("third_party/glog/src/*.cc") - incs += ' ./third_party/glog/src' + src = env.Glob("libmv-capi_stub.cc") env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137] ) -SConscript(['third_party/SConscript']) +if env['WITH_BF_LIBMV']: + SConscript(['third_party/SConscript']) |