diff --git a/cmake/DownloadPrebuilts.cmake b/cmake/DownloadPrebuilts.cmake index 9e8d3dfc..cd4711db 100644 --- a/cmake/DownloadPrebuilts.cmake +++ b/cmake/DownloadPrebuilts.cmake @@ -132,10 +132,11 @@ function(copy_dylibs LIBS) get_target_property(DYLIB_PATH ${LIB} LOCATION_${CMAKE_BUILD_TYPE}) get_filename_component(DYLIB_FILENAME ${DYLIB_PATH} NAME) message(STATUS "Copying ${DYLIB_FILENAME}") - file(COPY ${DYLIB_PATH} DESTINATION ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}) + file(COPY ${DYLIB_PATH} DESTINATION ${CMAKE_BINARY_DIR}) endforeach () endfunction () + #======================================================================================================================= if ("${SYSTEM_NAME_UPPER}" STREQUAL "LINUX") @@ -157,13 +158,19 @@ if ("${SYSTEM_NAME_UPPER}" STREQUAL "LINUX") set(OpenCV_LIBS ${OpenCV_LINK_LIBS}) set(OpenCV_LIBS_DEBUG ${OpenCV_LIBS}) - build_external_lib("build_opencv_w_contrib_for_linux.sh" "${OpenCV_VERSION}" "${OpenCV_PREBUILT_DIR}") + + if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") + download_lib("${OpenCV_PREBUILT_DIR}") + else () + build_external_lib("build_opencv_w_contrib_for_linux.sh" "${OpenCV_VERSION}" "${OpenCV_PREBUILT_DIR}") + endif () + ################# # g2o for Linux # ################# - set(g2o_PREBUILT_DIR "linux_g2o") + set(g2o_PREBUILT_DIR "linux_g2o_20170730") set(g2o_DIR "${PREBUILT_PATH}/${g2o_PREBUILT_DIR}") set(g2o_INCLUDE_DIR "${g2o_DIR}/include") @@ -175,8 +182,12 @@ if ("${SYSTEM_NAME_UPPER}" STREQUAL "LINUX") INTERFACE_INCLUDE_DIRECTORIES "${g2o_INCLUDE_DIR}") set(g2o_LIBS ${g2o_LIBS} ${lib}) endforeach (lib) - - build_external_lib("build_g2o_for_linux.sh" "" "${g2o_PREBUILT_DIR}") + + if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") + download_lib("${g2o_PREBUILT_DIR}") + else () + build_external_lib("build_g2o_for_linux.sh" "" "${g2o_PREBUILT_DIR}") + endif () #################### # Assimp for Linux # @@ -202,13 +213,18 @@ if ("${SYSTEM_NAME_UPPER}" STREQUAL "LINUX") set(assimp_LIBS assimp::assimp assimp::irrxml) - build_external_lib("build_assimp_for_linux.sh" "${assimp_VERSION}" "${assimp_PREBUILT_DIR}") + if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") + download_lib("${assimp_PREBUILT_DIR}") + else () + build_external_lib("build_assimp_for_linux.sh" "${assimp_VERSION}" "${assimp_PREBUILT_DIR}") + endif () ##################### # OpenSSL for Linux # ##################### - set(openssl_PREBUILT_DIR "linux_openssl") + set(openssl_VERSION "1.1.1h") + set(openssl_PREBUILT_DIR "linux_openssl_${openssl_VERSION}") set(openssl_DIR "${PREBUILT_PATH}/${openssl_PREBUILT_DIR}") set(openssl_INCLUDE_DIR ${openssl_DIR}/include) @@ -221,7 +237,11 @@ if ("${SYSTEM_NAME_UPPER}" STREQUAL "LINUX") set(openssl_LIBS ${openssl_LIBS} ${lib}) endforeach (lib) - build_external_lib("build_openssl_for_linux.sh" "OpenSSL_1_1_1h" "${openssl_PREBUILT_DIR}") + if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") + download_lib("${openssl_PREBUILT_DIR}") + else () + build_external_lib("build_openssl_for_linux.sh" "" "${openssl_PREBUILT_DIR}") + endif () #################### # Vulkan for Linux # @@ -345,7 +365,7 @@ elseif ("${SYSTEM_NAME_UPPER}" STREQUAL "WINDOWS") #---------------------------- ################### if (SL_BUILD_WAI) - set(g2o_PREBUILT_DIR "win64_g2o") + set(g2o_PREBUILT_DIR "win64_g2o_20170730") set(g2o_DIR "${PREBUILT_PATH}/${g2o_PREBUILT_DIR}") set(g2o_INCLUDE_DIR "${g2o_DIR}/include") set(g2o_LIB_DIR "${g2o_DIR}/lib") @@ -557,14 +577,15 @@ elseif ("${SYSTEM_NAME_UPPER}" STREQUAL "DARWIN" AND # g2o for MacOS-x86_64 # ######################## - set(g2o_PREBUILT_DIR "mac64_g2o") + set(g2o_PREBUILT_DIR "mac64_g2o_20170730") set(g2o_DIR "${PREBUILT_PATH}/${g2o_PREBUILT_DIR}") set(g2o_INCLUDE_DIR "${g2o_DIR}/include") foreach (lib ${g2o_LINK_LIBS}) add_library(${lib} SHARED IMPORTED) set_target_properties(${lib} PROPERTIES - IMPORTED_LOCATION "${g2o_DIR}/Debug/lib${lib}.dylib" + IMPORTED_LOCATION "${g2o_DIR}/Release/lib${lib}.dylib" + IMPORTED_LOCATION_DEBUG "${g2o_DIR}/Debug/lib${lib}.dylib" INTERFACE_INCLUDE_DIRECTORIES "${g2o_INCLUDE_DIR}") set(g2o_LIBS ${g2o_LIBS} ${lib}) endforeach (lib) @@ -761,7 +782,7 @@ elseif ("${SYSTEM_NAME_UPPER}" STREQUAL "DARWIN" AND # g2o for MacOS-arm64 # ####################### - set(g2o_PREBUILT_DIR "macArm64_g2o") + set(g2o_PREBUILT_DIR "macArm64_g2o_20170730") set(g2o_DIR "${PREBUILT_PATH}/${g2o_PREBUILT_DIR}") set(g2o_INCLUDE_DIR "${g2o_DIR}/include") diff --git a/externals/prebuild_scripts/build_assimp_for_linux.sh b/externals/prebuild_scripts/build_assimp_for_linux.sh index 37f2c3de..fe51337d 100755 --- a/externals/prebuild_scripts/build_assimp_for_linux.sh +++ b/externals/prebuild_scripts/build_assimp_for_linux.sh @@ -87,8 +87,22 @@ cp LICENSE "$ZIPFOLDER" cp Readme.md "$ZIPFOLDER" if [ -d "../../prebuilt/$ZIPFILE" ]; then - rm -rf ../../prebuilt/$ZIPFILE + rm -rf "../../prebuilt/$ZIPFILE" fi -mv "$ZIPFOLDER" "../../prebuilt/" +if [ ! -d "../../prebuilt/" ]; then + mkdir "../../prebuilt/" +fi + +echo "ls . : $(ls .)" +echo "ls ../../ : $(ls ../../)" +echo "ls ../../prebuilt : $(ls ../../prebuilt)" + +echo "cp -r $ZIPFOLDER ../../prebuilt/" +echo "PWD IS $PWD" +echo "../../prebuilt IS $PWD/../../prebuilt/" + +cp -r "$ZIPFOLDER" "../../prebuilt/" + +echo "prebuilt content is $(ls ../../prebuilt)" diff --git a/externals/prebuild_scripts/build_g2o_for_linux.sh b/externals/prebuild_scripts/build_g2o_for_linux.sh index 8a4d584f..b1a92b21 100755 --- a/externals/prebuild_scripts/build_g2o_for_linux.sh +++ b/externals/prebuild_scripts/build_g2o_for_linux.sh @@ -9,7 +9,7 @@ ZIPFILE="$ARCH"_g2o ZIPFOLDER="build/$ZIPFILE" BUILD_D=build/"$ARCH"_debug BUILD_R=build/"$ARCH"_release - +VERSION="20170730_git" clear echo "Building g2o using the sources in the thirdparty directory" if [ ! -d ../g2o ] @@ -20,12 +20,15 @@ fi cd ../g2o +git checkout $VERSION + # Make build folder for debug version mkdir build rm -rf $BUILD_D mkdir "$BUILD_D" cd "$BUILD_D" + # Run cmake to configure and generate the make files cmake \ -DCMAKE_INSTALL_PREFIX=install \ diff --git a/externals/prebuild_scripts/build_g2o_for_mac64.sh b/externals/prebuild_scripts/build_g2o_for_mac64.sh index b9a8e439..3fea1be4 100755 --- a/externals/prebuild_scripts/build_g2o_for_mac64.sh +++ b/externals/prebuild_scripts/build_g2o_for_mac64.sh @@ -1,25 +1,34 @@ #!/bin/sh - + # #################################################### # Build script for g2o for mac64 # #################################################### - + ARCH=mac64 -ZIPFILE="$ARCH"_g2o -ZIPFOLDER=build/$ZIPFILE +VERSION="20170730_git" +ZIPFOLDER="$ARCH"_g2o_20170730 BUILD_D=build/"$ARCH"_debug BUILD_R=build/"$ARCH"_release - + clear +echo "Building g2o using the sources in the thirdparty directory" +if [ ! -d ../g2o ] +then + echo "g2o directory doesn't exists" + git clone https://github.com/RainerKuemmerle/g2o.git ../g2o +fi + echo "Building g2o using the sources in the thirdparty directory" cd ../g2o - + +git checkout $VERSION + # Make build folder for debug version mkdir build rm -rf $BUILD_D mkdir $BUILD_D cd $BUILD_D - + # Run cmake to configure and generate the make files cmake \ -DCMAKE_OSX_ARCHITECTURES=x86_64 \ @@ -30,46 +39,51 @@ cmake \ -DCMAKE_DEBUG_POSTFIX="" \ -DEIGEN3_INCLUDE_DIR=../eigen \ ../.. - + # finally build it make -j8 - + # copy all into install folder make install cd ../.. # back to g2o - + # Make build folder for release version rm -rf $BUILD_R mkdir $BUILD_R cd $BUILD_R - + # Run cmake to configure and generate the make files cmake \ + -DCMAKE_OSX_ARCHITECTURES=x86_64 \ -DCMAKE_INSTALL_PREFIX=install \ -DG2O_BUILD_APPS=off \ -DG2O_BUILD_EXAMPLES=off \ -DCMAKE_BUILD_TYPE=Release \ -DEIGEN3_INCLUDE_DIR=../eigen \ + -DG2O_USE_OPENGL=off \ ../.. - + # finally build it make -j8 - + # copy all into install folder make install cd ../.. # back to g2o - + # Create zip folder for debug and release version -rm -rf $ZIPFOLDER -mkdir $ZIPFOLDER -cp -R $BUILD_R/install/include $ZIPFOLDER/include -cp -R $BUILD_R/install/lib $ZIPFOLDER/Release -cp -R $BUILD_D/install/lib $ZIPFOLDER/Debug -cp doc/license* $ZIPFOLDER -cp README.md $ZIPFOLDER - -if [ -d "../prebuilt/$ZIPFILE" ]; then - rm -rf ../prebuilt/$ZIPFILE -fi - -mv $ZIPFOLDER ../prebuilt +rm -rf ../prebuilt/$ZIPFOLDER +mkdir ../prebuilt/$ZIPFOLDER +echo $BUILD_R +echo $(pwd) +echo ../prebuilt/$ZIPFOLDER +cp -R $BUILD_R/install/include ../prebuilt/$ZIPFOLDER/include +cp -R $BUILD_R/install/lib ../prebuilt/$ZIPFOLDER/Release +cp -R $BUILD_D/install/lib ../prebuilt/$ZIPFOLDER/Debug +cp doc/license* ../prebuilt/$ZIPFOLDER +cp README.md ../prebuilt/$ZIPFOLDER + +#if [ -d "../prebuilt/$ZIPFILE" ]; then +# rm -rf ../prebuilt/$ZIPFILE +#fi + +#mv $ZIPFOLDER ../prebuilt diff --git a/externals/prebuild_scripts/build_g2o_for_macArm64.sh b/externals/prebuild_scripts/build_g2o_for_macArm64.sh index af473cff..b220a98e 100755 --- a/externals/prebuild_scripts/build_g2o_for_macArm64.sh +++ b/externals/prebuild_scripts/build_g2o_for_macArm64.sh @@ -1,25 +1,33 @@ #!/bin/sh - + # #################################################### # Build script for g2o for macArm64 # #################################################### - + ARCH="macArm64" -ZIPFILE="$ARCH"_g2o -ZIPFOLDER=build/$ZIPFILE +VERSION="20170730_git" +ZIPFOLDER="$ARCH"_g2o_20170730 BUILD_D=build/"$ARCH"_debug BUILD_R=build/"$ARCH"_release - clear +echo "Building g2o using the sources in the thirdparty directory" +if [ ! -d ../g2o ] +then + echo "g2o directory doesn't exists" + git clone https://github.com/RainerKuemmerle/g2o.git ../g2o +fi + echo "Building g2o using the sources in the thirdparty directory" cd ../g2o - + +git checkout $VERSION + # Make build folder for debug version mkdir build rm -rf $BUILD_D mkdir $BUILD_D cd $BUILD_D - + # Run cmake to configure and generate the make files cmake \ -DCMAKE_OSX_ARCHITECTURES=arm64 \ @@ -29,47 +37,51 @@ cmake \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_DEBUG_POSTFIX="" \ -DEIGEN3_INCLUDE_DIR=../eigen \ + -DG2O_USE_OPENGL=off \ ../.. - + # finally build it make -j8 - + # copy all into install folder make install cd ../.. # back to g2o - + # Make build folder for release version rm -rf $BUILD_R mkdir $BUILD_R cd $BUILD_R - + # Run cmake to configure and generate the make files cmake \ + -DCMAKE_OSX_ARCHITECTURES=arm64 \ -DCMAKE_INSTALL_PREFIX=install \ -DG2O_BUILD_APPS=off \ -DG2O_BUILD_EXAMPLES=off \ -DCMAKE_BUILD_TYPE=Release \ -DEIGEN3_INCLUDE_DIR=../eigen \ ../.. - + # finally build it make -j8 - + # copy all into install folder make install cd ../.. # back to g2o - + # Create zip folder for debug and release version -rm -rf $ZIPFOLDER -mkdir $ZIPFOLDER -cp -R $BUILD_R/install/include $ZIPFOLDER/include -cp -R $BUILD_R/install/lib $ZIPFOLDER/Release -cp -R $BUILD_D/install/lib $ZIPFOLDER/Debug -cp doc/license* $ZIPFOLDER -cp README.md $ZIPFOLDER - -if [ -d "../prebuilt/$ZIPFILE" ]; then - rm -rf ../prebuilt/$ZIPFILE -fi - -mv $ZIPFOLDER ../prebuilt +rm -rf ../prebuilt/$ZIPFOLDER +mkdir ../prebuilt/$ZIPFOLDER +echo "dst is ../prebuilt/$ZIPFOLDER/" +cp -R $BUILD_R/install/include ../prebuilt/$ZIPFOLDER/include +cp -R $BUILD_R/install/lib ../prebuilt/$ZIPFOLDER/Release +cp -R $BUILD_D/install/lib ../prebuilt/$ZIPFOLDER/Debug +cp doc/license* ../prebuilt/$ZIPFOLDER +cp README.md ../prebuilt/$ZIPFOLDER + +#if [ -d "../prebuilt/$ZIPFILE" ]; then +# rm -rf ../prebuilt/$ZIPFILE +#fi + +#mv $ZIPFOLDER ../prebuilt + diff --git a/externals/prebuild_scripts/build_g2o_x64.bat b/externals/prebuild_scripts/build_g2o_x64.bat index 04387a4e..78159681 100644 --- a/externals/prebuild_scripts/build_g2o_x64.bat +++ b/externals/prebuild_scripts/build_g2o_x64.bat @@ -19,9 +19,10 @@ set PATH=%PATH%;C:\Program Files (x86)\Git\bin :: build configuration set MAX_NUM_CPU_CORES=6 -set CMAKE_GENERATOR="Visual Studio 16 2019" +::set CMAKE_GENERATOR="Visual Studio 16 2019" set CMAKE_ARCHITECTURE=x64 set EIGEN_VERSION=3.3.3 +set VERSION=20170730_git :: g2o configuration flags set BUILD_APPS=OFF @@ -34,12 +35,13 @@ set QGLVIEWER_DIR=%cd%\libQGLViewer\QGLViewer set QGLVIEWER_DEBUG_LIB=%cd%\libQGLViewer\QGLViewer\QGLViewerd2d.lib set QGLVIEWER_RELEASE_LIB=%cd%\libQGLViewer\QGLViewer\QGLViewerd2.lib set INSTALL_DIR=%cd%\g2o\INSTALL-vs -set QT_DIR=A:\Qt\5.11.2\msvc2017_64\lib\cmake\Qt5 +::set QT_DIR=C:\ProgramData\chocolatey\lib\mingw\tools\install +::set QT_DIR=A:\Qt\5.11.2\msvc2017_64\lib\cmake\Qt5 echo QGLVIEWER_DIR %QGLVIEWER_DIR% echo QGLVIEWER_DEBUG_LIB %QGLVIEWER_DEBUG_LIB% echo QGLVIEWER_RELEASE_LIB %QGLVIEWER_RELEASE_LIB% -echo QT_DIR %QT_DIR% +::echo QT_DIR %QT_DIR% echo INSTALL_DIR %INSTALL_DIR% ::-----------------------------------------------------------------:: :: get eigen @@ -60,11 +62,14 @@ if not exist g2o ( ) else ( echo g2o already exists ) + cd g2o +git checkout %VERSION% mkdir %INSTALL_DIR% mkdir BUILD-vs cd BUILD-vs -cmake -G %CMAKE_GENERATOR% -A %CMAKE_ARCHITECTURE% -DEIGEN3_INCLUDE_DIR=..\eigen -DEigen3_DIR=..\eigen -DG2O_BUILD_APPS=%BUILD_APPS% -DG2O_BUILD_EXAMPLES=%BUILD_EXAMPLES% -DG2O_USE_CSPARSE=%USE_CSPARSE% -DG2O_USE_CHOLMOD=%USE_CHOLMOD% -DG2O_USE_OPENGL=%USE_OPENGL% -DQt5_DIR=%QT_DIR% -DQGLVIEWER_INCLUDE_DIR=%QGLVIEWER_DIR% -DQGLVIEWER_LIBRARY_DEBUG=%QGLVIEWER_DEBUG_LIB% -DQGLVIEWER_LIBRARY_RELEASE=%QGLVIEWER_RELEASE_LIB% -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% .. +:: Removed -G %CMAKE_GENERATOR% -DQt5_DIR=%QT_DIR% +cmake -A %CMAKE_ARCHITECTURE% -DWINDOWS_EXPORT_ALL_SYMBOLS=ON -DEIGEN3_INCLUDE_DIR=..\eigen -DEigen3_DIR=..\eigen -DG2O_BUILD_APPS=%BUILD_APPS% -DG2O_BUILD_EXAMPLES=%BUILD_EXAMPLES% -DG2O_USE_CSPARSE=%USE_CSPARSE% -DG2O_USE_CHOLMOD=%USE_CHOLMOD% -DG2O_USE_OPENGL=%USE_OPENGL% -DQGLVIEWER_INCLUDE_DIR=%QGLVIEWER_DIR% -DQGLVIEWER_LIBRARY_DEBUG=%QGLVIEWER_DEBUG_LIB% -DQGLVIEWER_LIBRARY_RELEASE=%QGLVIEWER_RELEASE_LIB% -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% .. msbuild INSTALL.vcxproj -maxcpucount:%MAX_NUM_CPU_CORES% /p:Configuration=Debug msbuild INSTALL.vcxproj -maxcpucount:%MAX_NUM_CPU_CORES% /p:Configuration=Release cd ..\.. diff --git a/externals/prebuild_scripts/build_opencv_w_contrib_for_linux.sh b/externals/prebuild_scripts/build_opencv_w_contrib_for_linux.sh index 590359b5..85c4ec05 100755 --- a/externals/prebuild_scripts/build_opencv_w_contrib_for_linux.sh +++ b/externals/prebuild_scripts/build_opencv_w_contrib_for_linux.sh @@ -76,7 +76,7 @@ cmake \ ../.. # finally build it -make -j8 +make -j16 # copy all into install folder make install @@ -85,8 +85,9 @@ cd ../.. # back to opencv # Make build folder for release version rm -rf $BUILD_R mkdir $BUILD_R +echo "$BUILD_R and $BUILD_D" cd $BUILD_R - +# # Run cmake to configure and generate the make files cmake \ -DCMAKE_CONFIGURATION_TYPES=Release \ @@ -110,7 +111,7 @@ cmake \ ../.. # finally build it -make -j8 +make -j16 # copy all into install folder make install @@ -118,7 +119,9 @@ cd ../.. # back to opencv # Create zip folder for debug and release version rm -rf $ZIPFOLDER -mkdir $ZIPFOLDER +mkdir -p "$ZIPFOLDER" + +echo "$PWD/$BUILD_R/install/include $PWD/$ZIPFOLDER/include" cp -R $BUILD_R/install/include $ZIPFOLDER/include cp -R $BUILD_R/install/lib $ZIPFOLDER/Release cp -R $BUILD_D/install/lib $ZIPFOLDER/Debug @@ -131,8 +134,24 @@ fi cp LICENSE $ZIPFOLDER cp README.md $ZIPFOLDER -if [ -d "../../prebuilt/$ZIPFILE" ]; then - rm -rf ../../prebuilt/$ZIPFILE +if [ -d "../prebuilt/$ZIPFILE" ]; then + rm -rf "../prebuilt/$ZIPFILE" fi -mv $ZIPFOLDER ../../prebuilt +if [ ! -d "../../prebuilt/" ]; then + mkdir "../../prebuilt/" +fi + + +echo "ls . : $(ls .)" +echo "ls ../../ : $(ls ../../)" +echo "ls ../../prebuilt : $(ls ../../prebuilt)" + + +echo "cp -r $ZIPFOLDER ../../prebuilt" +echo "PWD IS $PWD" +echo "../../prebuilt IS $PWD/../../prebuilt" +cp -r "$ZIPFOLDER" "../../prebuilt" + + +echo "prebuilt content is $(ls ../../prebuilt)" diff --git a/externals/prebuild_scripts/build_opencv_w_contrib_for_win64.bat b/externals/prebuild_scripts/build_opencv_w_contrib_for_win64.bat index f38c40a6..9ed1de06 100644 --- a/externals/prebuild_scripts/build_opencv_w_contrib_for_win64.bat +++ b/externals/prebuild_scripts/build_opencv_w_contrib_for_win64.bat @@ -17,7 +17,7 @@ :: To enable downloading prebuilds copy set PATH=%PATH%;C:\Program Files (x86)\Git\bin set MAX_NUM_CPU_CORES=6 -set CMAKE_GENERATOR="Visual Studio 16 2019" +::set CMAKE_GENERATOR="Visual Studio 16 2019" set CMAKE_ARCHITECTURE=x64 set OPENCV_VERSION=%1 set SLPROJECT_ROOT=%2 @@ -58,7 +58,6 @@ git pull origin %OPENCV_VERSION% mkdir BUILD-%OPENCV_VERSION%-vs cd BUILD-%OPENCV_VERSION%-vs cmake ^ --G %CMAKE_GENERATOR% ^ -A %CMAKE_ARCHITECTURE% ^ -DWITH_CUDA=OFF ^ -DOPENCV_EXTRA_MODULES_PATH=..\..\opencv_contrib\modules ^ diff --git a/externals/prebuild_scripts/build_openssl_for_linux.sh b/externals/prebuild_scripts/build_openssl_for_linux.sh index 3f6d8f04..6e29d17e 100755 --- a/externals/prebuild_scripts/build_openssl_for_linux.sh +++ b/externals/prebuild_scripts/build_openssl_for_linux.sh @@ -5,14 +5,15 @@ # #################################################### +VERSION="1.1.1h" openssl_VERSION="OpenSSL_1_1_1h" -if [ -n "$1" ] -then - openssl_VERSION="$1" -fi +#if [ -n "$1" ] +#then +# openssl_VERSION="$1" +#fi ARCH=linux -ZIPFILE=${ARCH}_openssl +ZIPFILE=${ARCH}_openssl_${VERSION} clear echo "Building openssl Version: $openssl_VERSION" diff --git a/modules/wai/source/orb_slam/Optimizer.cpp b/modules/wai/source/orb_slam/Optimizer.cpp index bbe70486..91f06cc3 100644 --- a/modules/wai/source/orb_slam/Optimizer.cpp +++ b/modules/wai/source/orb_slam/Optimizer.cpp @@ -1554,15 +1554,17 @@ int Optimizer::OptimizeSim3(WAIKeyFrame* pKF1, vSim3->setFixed(false); //replacement because of new g2o (maybe this leads to errors...) +#if defined(SL_OS_ANDROID) || defined(SL_OS_MACIOS) vSim3->_principle_point[0] = K1.at(0, 2); vSim3->_principle_point[1] = K1.at(1, 2); vSim3->_focal_length[0] = K1.at(0, 0); vSim3->_focal_length[1] = K1.at(1, 1); - - //vSim3->_principle_point1[0] = K1.at(0,2); - //vSim3->_principle_point1[1] = K1.at(1,2); - //vSim3->_focal_length1[0] = K1.at(0,0); - //vSim3->_focal_length1[1] = K1.at(1,1); +#else + vSim3->_principle_point1[0] = K1.at(0,2); + vSim3->_principle_point1[1] = K1.at(1,2); + vSim3->_focal_length1[0] = K1.at(0,0); + vSim3->_focal_length1[1] = K1.at(1,1); +#endif //vSim3->_principle_point2[0] = K2.at(0,2); //vSim3->_principle_point2[1] = K2.at(1,2); //vSim3->_focal_length2[0] = K2.at(0,0);