diff options
Diffstat (limited to 'extern/libmv/bundle.sh')
-rwxr-xr-x | extern/libmv/bundle.sh | 73 |
1 files changed, 39 insertions, 34 deletions
diff --git a/extern/libmv/bundle.sh b/extern/libmv/bundle.sh index fb336c66d61..ca808e12d7e 100755 --- a/extern/libmv/bundle.sh +++ b/extern/libmv/bundle.sh @@ -33,14 +33,14 @@ rm -rf $tmp chmod 664 ./third_party/glog/src/windows/*.cc ./third_party/glog/src/windows/*.h ./third_party/glog/src/windows/glog/*.h -sources=`find ./libmv -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | sed -r 's/^\.\//\t/'` -headers=`find ./libmv -type f -iname '*.h' | sed -r 's/^\.\//\t/'` +sources=`find ./libmv -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | sed -r 's/^\.\//\t/' | sort -d` +headers=`find ./libmv -type f -iname '*.h' | sed -r 's/^\.\//\t/' | sort -d` -third_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep -v glog | sed -r 's/^\.\//\t/'` -third_headers=`find ./third_party -type f -iname '*.h' | grep -v glog | sed -r 's/^\.\//\t/'` +third_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep -v glog | sed -r 's/^\.\//\t/' | sort` +third_headers=`find ./third_party -type f -iname '*.h' | grep -v glog | sed -r 's/^\.\//\t/' | sort` -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/'` -third_glog_headers=`find ./third_party -type f -iname '*.h' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t/'` +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/' | sort` +third_glog_headers=`find ./third_party -type f -iname '*.h' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t/' | sort` src_dir=`find ./libmv -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | sed -r 's/^\.\//\t/' | sort | uniq` src_third_dir=`find ./third_party -type f -iname '*.cc' -exec dirname {} \; -or -iname '*.cpp' -exec dirname {} \; -or -iname '*.c' -exec dirname {} \; | sed -r 's/^\.\//\t/' | sort | uniq` @@ -89,7 +89,6 @@ for x in $src_dir $src_third_dir; do done cat > CMakeLists.txt << EOF -# \$Id\$ # ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software; you can redistribute it and/or @@ -114,17 +113,21 @@ cat > CMakeLists.txt << EOF # # ***** END GPL LICENSE BLOCK ***** +# NOTEL This file is automatically generated by bundle.sh script +# If you're doing changes in this file, please update template +# in that script too + set(INC . ../Eigen3 - ./third_party/ssba - ./third_party/ldl/Include + third_party/ssba + third_party/ldl/Include ../colamd/Include ) set(INC_SYS - ${PNG_INCLUDE_DIR} - ${ZLIB_INCLUDE_DIRS} + \${PNG_INCLUDE_DIR} + \${ZLIB_INCLUDE_DIRS} ) set(SRC @@ -139,7 +142,7 @@ ${headers} ${third_headers} ) -IF(WIN32) +if(WIN32) list(APPEND SRC third_party/glog/src/logging.cc third_party/glog/src/raw_logging.cc @@ -167,28 +170,23 @@ IF(WIN32) ) list(APPEND INC - ./third_party/glog/src/windows + third_party/glog/src/windows ) - IF(NOT MINGW) + if(NOT MINGW) list(APPEND INC - ./third_party/msinttypes + third_party/msinttypes ) - ENDIF(MINGW) - - list(APPEND INC - ./third_party/glog/src/windows - ./third_party/msinttypes - ) + endif() - IF(MSVC) + if(MSVC) set(MSVC_OFLAGS O1 O2 Ox) foreach(FLAG \${MSVC_OFLAGS}) string(REPLACE "\${FLAG}" "Od" CMAKE_CXX_FLAGS_RELEASE "\${CMAKE_CXX_FLAGS_RELEASE}") string(REPLACE "\${FLAG}" "Od" CMAKE_C_FLAGS_RELWITHDEBINFO "\${CMAKE_C_FLAGS_RELWITHDEBINFO}") endforeach() - ENDIF(MSVC) -ELSE(WIN32) + endif() +else() list(APPEND SRC ${third_glog_sources} @@ -196,17 +194,25 @@ ${third_glog_headers} ) list(APPEND INC - ./third_party/glog/src + third_party/glog/src ) -ENDIF(WIN32) +endif() -add_definitions(-DV3DLIB_ENABLE_SUITESPARSE -DGOOGLE_GLOG_DLL_DECL=) +add_definitions( + -DV3DLIB_ENABLE_SUITESPARSE + -DGOOGLE_GLOG_DLL_DECL= +) blender_add_lib(extern_libmv "\${SRC}" "\${INC}" "\${INC_SYS}") EOF cat > SConscript << EOF #!/usr/bin/python + +# NOTEL This file is automatically generated by bundle.sh script +# If you're doing changes in this file, please update template +# in that script too + import sys import os @@ -230,7 +236,6 @@ incs += ' ' + env['BF_ZLIB_INC'] if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog' - incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog' if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): incs += ' ./third_party/msinttypes' ${win_src} @@ -246,16 +251,16 @@ ${win_src} defs.append('NDEBUG') else: if not env['BF_DEBUG']: - cflags_libmv = Split(env['REL_CFLAGS']) - ccflags_libmv = Split(env['REL_CCFLAGS']) - cxxflags_libmv = Split(env['REL_CXXFLAGS']) + cflags_libmv += Split(env['REL_CFLAGS']) + ccflags_libmv += Split(env['REL_CCFLAGS']) + cxxflags_libmv += Split(env['REL_CXXFLAGS']) else: src += env.Glob("third_party/glog/src/*.cc") incs += ' ./third_party/glog/src' if not env['BF_DEBUG']: - cflags_libmv = Split(env['REL_CFLAGS']) - ccflags_libmv = Split(env['REL_CCFLAGS']) - cxxflags_libmv = Split(env['REL_CXXFLAGS']) + cflags_libmv += Split(env['REL_CFLAGS']) + ccflags_libmv += Split(env['REL_CCFLAGS']) + cxxflags_libmv += Split(env['REL_CXXFLAGS']) incs += ' ./third_party/ssba ./third_party/ldl/Include ../colamd/Include' |