LEFT | RIGHT |
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 #BRANCH="keir" | 3 #BRANCH="keir" |
4 BRANCH="Matthias-Fauconneau" | 4 BRANCH="Matthias-Fauconneau" |
5 | 5 |
6 if [ -d ./.svn ]; then | 6 if [ -d ./.svn ]; then |
7 echo "This script is supposed to work only when using git-svn" | 7 echo "This script is supposed to work only when using git-svn" |
8 exit 1 | 8 exit 1 |
9 fi | 9 fi |
10 | 10 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 incs += ' ./third_party/glog/src' | 238 incs += ' ./third_party/glog/src' |
239 if not env['BF_DEBUG']: | 239 if not env['BF_DEBUG']: |
240 cflags_libmv = Split(env['REL_CFLAGS']) | 240 cflags_libmv = Split(env['REL_CFLAGS']) |
241 ccflags_libmv = Split(env['REL_CCFLAGS']) | 241 ccflags_libmv = Split(env['REL_CCFLAGS']) |
242 cxxflags_libmv = Split(env['REL_CXXFLAGS']) | 242 cxxflags_libmv = Split(env['REL_CXXFLAGS']) |
243 | 243 |
244 incs += ' ./third_party/ssba ./third_party/ldl/Include ../colamd/Include' | 244 incs += ' ./third_party/ssba ./third_party/ldl/Include ../colamd/Include' |
245 | 245 |
246 env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), de
fines=defs, libtype=['extern', 'player'], priority=[20,137], compileflags=cflags
_libmv, cc_compileflags=ccflags_libmv, cxx_compileflags=cxxflags_libmv ) | 246 env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), de
fines=defs, libtype=['extern', 'player'], priority=[20,137], compileflags=cflags
_libmv, cc_compileflags=ccflags_libmv, cxx_compileflags=cxxflags_libmv ) |
247 EOF | 247 EOF |
248 #!/bin/sh | |
249 | |
250 if [ "x$1" = "x--i-really-know-what-im-doing" ] ; then | |
251 echo Proceeding as requested by command line ... | |
252 else | |
253 echo "*** Please run again with --i-really-know-what-im-doing ..." | |
254 exit 1 | |
255 fi | |
256 | |
257 #BRANCH="keir" | |
258 #BRANCH="Matthias-Fauconneau" | |
259 BRANCH="Nazg-Gul" | |
260 | |
261 repo="git://github.com/${BRANCH}/libmv.git" | |
262 tmp=`mktemp -d` | |
263 | |
264 git clone $repo $tmp/libmv | |
265 | |
266 #git --git-dir $tmp/libmv/.git --work-tree $tmp/libmv log --since="1 month ago"
> ChangeLog | |
267 git --git-dir $tmp/libmv/.git --work-tree $tmp/libmv log -n 50 > ChangeLog | |
268 | |
269 for p in `cat ./patches/series`; do | |
270 echo "Applying patch $p..." | |
271 cat ./patches/$p | patch -d $tmp/libmv -p1 | |
272 done | |
273 | |
274 find libmv -type f -not -iwholename '*.svn*' -exec rm -rf {} \; | |
275 find third_party -type f -not -iwholename '*.svn*' -not -iwholename '*third_part
y/ceres*' \ | |
276 -not -iwholename '*third_party/SConscript*' -not -iwholename '*third_party/C
MakeLists.txt*' \ | |
277 -exec rm -rf {} \; | |
278 | |
279 cat "files.txt" | while read f; do | |
280 mkdir -p `dirname $f` | |
281 cp $tmp/libmv/src/$f $f | |
282 done | |
283 | |
284 rm -rf $tmp | |
285 | |
286 chmod 664 ./third_party/glog/src/windows/*.cc ./third_party/glog/src/windows/*.h
./third_party/glog/src/windows/glog/*.h | |
287 | |
288 sources=`find ./libmv -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c'
| sed -r 's/^\.\//\t\t/' | sort -d` | |
289 headers=`find ./libmv -type f -iname '*.h' | sed -r 's/^\.\//\t\t/' | sort -d` | |
290 | |
291 third_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -
iname '*.c' | grep -v glog | grep -v ceres | sed -r 's/^\.\//\t\t/' | sort -d` | |
292 third_headers=`find ./third_party -type f -iname '*.h' | grep -v glog | grep -v
ceres | sed -r 's/^\.\//\t\t/' | sort -d` | |
293 | |
294 third_glog_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp'
-or -iname '*.c' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t\t/' | sort
-d` | |
295 third_glog_headers=`find ./third_party -type f -iname '*.h' | grep glog | grep -
v windows | sed -r 's/^\.\//\t\t\t/' | sort -d` | |
296 | |
297 src_dir=`find ./libmv -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cp
p' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | sed -r 's/^\.\//\t
\t/' | sort -d | uniq` | |
298 src_third_dir=`find ./third_party -type f -iname '*.cc' -exec dirname {} \; -or
-iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | grep
-v ceres | sed -r 's/^\.\//\t\t/' | sort -d | uniq` | |
299 src="" | |
300 win_src="" | |
301 for x in $src_dir $src_third_dir; do | |
302 t="" | |
303 | |
304 if test `echo "$x" | grep -c glog ` -eq 1; then | |
305 continue; | |
306 fi | |
307 | |
308 if stat $x/*.cpp > /dev/null 2>&1; then | |
309 t=" src += env.Glob('`echo $x'/*.cpp'`')" | |
310 fi | |
311 | |
312 if stat $x/*.c > /dev/null 2>&1; then | |
313 if [ -z "$t" ]; then | |
314 t=" src += env.Glob('`echo $x'/*.c'`')" | |
315 else | |
316 t="$t + env.Glob('`echo $x'/*.c'`')" | |
317 fi | |
318 fi | |
319 | |
320 if stat $x/*.cc > /dev/null 2>&1; then | |
321 if [ -z "$t" ]; then | |
322 t=" src += env.Glob('`echo $x'/*.cc'`')" | |
323 else | |
324 t="$t + env.Glob('`echo $x'/*.cc'`')" | |
325 fi | |
326 fi | |
327 | |
328 if test `echo $x | grep -c windows ` -eq 0; then | |
329 if [ -z "$src" ]; then | |
330 src=$t | |
331 else | |
332 src=`echo "$src\n$t"` | |
333 fi | |
334 else | |
335 if [ -z "$win_src" ]; then | |
336 win_src=`echo " $t"` | |
337 else | |
338 win_src=`echo "$win_src\n $t"` | |
339 fi | |
340 fi | |
341 done | |
342 | |
343 cat > CMakeLists.txt << EOF | |
344 # ***** BEGIN GPL LICENSE BLOCK ***** | |
345 # | |
346 # This program is free software; you can redistribute it and/or | |
347 # modify it under the terms of the GNU General Public License | |
348 # as published by the Free Software Foundation; either version 2 | |
349 # of the License, or (at your option) any later version. | |
350 # | |
351 # This program is distributed in the hope that it will be useful, | |
352 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
353 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
354 # GNU General Public License for more details. | |
355 # | |
356 # You should have received a copy of the GNU General Public License | |
357 # along with this program; if not, write to the Free Software Foundation, | |
358 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
359 # | |
360 # The Original Code is Copyright (C) 2011, Blender Foundation | |
361 # All rights reserved. | |
362 # | |
363 # Contributor(s): Blender Foundation, | |
364 # Sergey Sharybin | |
365 # | |
366 # ***** END GPL LICENSE BLOCK ***** | |
367 | |
368 # NOTE: This file is automatically generated by bundle.sh script | |
369 # If you're doing changes in this file, please update template | |
370 # in that script too | |
371 | |
372 set(INC | |
373 . | |
374 ) | |
375 | |
376 set(SRC | |
377 libmv-capi.h | |
378 libmv-capi_intern.h | |
379 ) | |
380 | |
381 if(WITH_LIBMV) | |
382 add_definitions( | |
383 -DWITH_LIBMV | |
384 -DWITH_LIBMV_GUARDED_ALLOC | |
385 -DGOOGLE_GLOG_DLL_DECL= | |
386 ) | |
387 | |
388 list(APPEND INC | |
389 third_party/ceres/include | |
390 ../../intern/guardedalloc | |
391 ) | |
392 | |
393 set(INC_SYS | |
394 ../Eigen3 | |
395 \${PNG_INCLUDE_DIR} | |
396 \${ZLIB_INCLUDE_DIRS} | |
397 ) | |
398 | |
399 list(APPEND SRC | |
400 libmv-capi.cc | |
401 ${sources} | |
402 | |
403 ${third_sources} | |
404 | |
405 ${headers} | |
406 | |
407 ${third_headers} | |
408 ) | |
409 | |
410 if(WIN32) | |
411 list(APPEND SRC | |
412 third_party/glog/src/logging.cc | |
413 third_party/glog/src/raw_logging.cc | |
414 third_party/glog/src/utilities.cc | |
415 third_party/glog/src/vlog_is_on.cc | |
416 third_party/glog/src/windows/port.cc | |
417 | |
418 third_party/glog/src/utilities.h | |
419 third_party/glog/src/stacktrace_generic-inl.h | |
420 third_party/glog/src/stacktrace.h | |
421 third_party/glog/src/stacktrace_x86_64-inl.h | |
422 third_party/glog/src/base/googleinit.h | |
423 third_party/glog/src/base/mutex.h | |
424 third_party/glog/src/base/commandlineflags.h | |
425 third_party/glog/src/stacktrace_powerpc-inl.h | |
426 third_party/glog/src/stacktrace_x86-inl.h | |
427 third_party/glog/src/config.h | |
428 third_party/glog/src/stacktrace_libunwind-inl.h | |
429 third_party/glog/src/windows/glog/raw_logging.h | |
430 third_party/glog/src/windows/glog/vlog_is_on.h | |
431 third_party/glog/src/windows/glog/logging.h | |
432 third_party/glog/src/windows/glog/log_severity.h | |
433 third_party/glog/src/windows/port.h | |
434 third_party/glog/src/windows/config.h | |
435 ) | |
436 | |
437 list(APPEND INC | |
438 third_party/glog/src/windows | |
439 ) | |
440 | |
441 if(NOT MINGW) | |
442 list(APPEND INC | |
443 third_party/msinttypes | |
444 ) | |
445 endif() | |
446 else() | |
447 list(APPEND SRC | |
448 ${third_glog_sources} | |
449 | |
450 ${third_glog_headers} | |
451 ) | |
452 | |
453 list(APPEND INC | |
454 third_party/glog/src | |
455 ) | |
456 endif() | |
457 else() | |
458 list(APPEND SRC | |
459 libmv-capi_stub.cc | |
460 ) | |
461 endif() | |
462 | |
463 blender_add_lib(extern_libmv "\${SRC}" "\${INC}" "\${INC_SYS}") | |
464 | |
465 if(WITH_LIBMV) | |
466 add_subdirectory(third_party) | |
467 endif() | |
468 EOF | |
469 | |
470 cat > SConscript << EOF | |
471 #!/usr/bin/python | |
472 | |
473 # NOTE: This file is automatically generated by bundle.sh script | |
474 # If you're doing changes in this file, please update template | |
475 # in that script too | |
476 | |
477 import sys | |
478 import os | |
479 | |
480 Import('env') | |
481 | |
482 defs = [] | |
483 incs = '.' | |
484 | |
485 if env['WITH_BF_LIBMV']: | |
486 defs.append('GOOGLE_GLOG_DLL_DECL=') | |
487 defs.append('WITH_LIBMV') | |
488 defs.append('WITH_LIBMV_GUARDED_ALLOC') | |
489 | |
490 src = env.Glob("libmv-capi.cc") | |
491 $src | |
492 | |
493 incs += ' ../Eigen3 third_party/ceres/include ../../intern/guardedalloc' | |
494 incs += ' ' + env['BF_PNG_INC'] | |
495 incs += ' ' + env['BF_ZLIB_INC'] | |
496 | |
497 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc
', 'win64-mingw'): | |
498 incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/
glog' | |
499 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): | |
500 incs += ' ./third_party/msinttypes' | |
501 ${win_src} | |
502 src += ['./third_party/glog/src/logging.cc', './third_party/glog/src/raw
_logging.cc', './third_party/glog/src/utilities.cc', './third_party/glog/src/vlo
g_is_on.cc'] | |
503 src += ['./third_party/glog/src/windows/port.cc'] | |
504 else: | |
505 src += env.Glob("third_party/glog/src/*.cc") | |
506 incs += ' ./third_party/glog/src' | |
507 else: | |
508 src = env.Glob("libmv-capi_stub.cc") | |
509 | |
510 env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), de
fines=defs, libtype=['extern', 'player'], priority=[20,137] ) | |
511 | |
512 if env['WITH_BF_LIBMV']: | |
513 SConscript(['third_party/SConscript']) | |
514 EOF | |
LEFT | RIGHT |