Skip to content

Instantly share code, notes, and snippets.

@matlabbe
matlabbe / orbslam3_v4_rtabmap_fix.patch
Last active June 7, 2022 00:38
orbslam3 v0.4-beta fix for rtabmap integration
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c731bb..e6d2c1c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,17 +9,20 @@ MESSAGE("Build type: " ${CMAKE_BUILD_TYPE})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3")
-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=native")
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native")
@matlabbe
matlabbe / pcl_1_8_0_vtk_android_support.patch
Last active January 4, 2022 03:31
Patch for PCL 1.8.0 to add vtk support in android build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5fd763e3..49472ce66 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -358,7 +358,7 @@ endif(WITH_QT)
# Find VTK
option(WITH_VTK "Build VTK-Visualizations" TRUE)
-if(WITH_VTK AND NOT ANDROID)
+if(WITH_VTK)
diff --git a/CMake/vtkAndroid.cmake b/CMake/vtkAndroid.cmake
index 3b8a66e491..f5745bc750 100644
--- a/CMake/vtkAndroid.cmake
+++ b/CMake/vtkAndroid.cmake
@@ -96,7 +96,8 @@ set(android_cmake_flags
-DANT_EXECUTABLE:FILE=${ANT_EXECUTABLE}
-DBUILD_SHARED_LIBS:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
- -DBUILD_EXAMPLES:BOOL=${BUILD_EXAMPLES}
+ -DBUILD_EXAMPLES:BOOL=OFF
@matlabbe
matlabbe / opencv_ios.patch
Created November 16, 2021 22:18
OpenCV 3.4.2 patch for ios
diff --git a/3rdparty/libpng/CMakeLists.txt b/3rdparty/libpng/CMakeLists.txt
index da290292c5..e514079f8a 100644
--- a/3rdparty/libpng/CMakeLists.txt
+++ b/3rdparty/libpng/CMakeLists.txt
@@ -2,7 +2,7 @@
# CMake file for libpng. See root CMakeLists.txt
#
# ----------------------------------------------------------------------------
-
+add_definitions(-DPNG_ARM_NEON_OPT=0)
@matlabbe
matlabbe / flann_ios.patch
Created November 16, 2021 20:56
flann 1.8.4 patch for ios build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3279915..c1f930a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -155,9 +155,9 @@ endif(WIN32)
add_subdirectory( cmake )
add_subdirectory( src )
-add_subdirectory( examples )
-add_subdirectory( test )
@matlabbe
matlabbe / alicevision_0f6115b.patch
Last active September 27, 2021 23:44
Patches to make latest AliceVision (as Sept 13 2021) works with rtabmap library (no crash, all unwrapping methods working)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3a5c91d30..015421d2f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -343,7 +343,7 @@ find_package(Eigen3 3.3 REQUIRED)
if(Eigen3_FOUND OR EIGEN3_FOUND)
# message(STATUS "EIGEN_INCLUDE_DIR: ${EIGEN_INCLUDE_DIR}")
# See https://eigen.tuxfamily.org/dox/group__TopicUnalignedArrayAssert.html
- set(AV_EIGEN_DEFINITIONS -DEIGEN_MAX_ALIGN_BYTES=0 -DEIGEN_MAX_STATIC_ALIGN_BYTES=0)
+ #set(AV_EIGEN_DEFINITIONS -DEIGEN_MAX_ALIGN_BYTES=0 -DEIGEN_MAX_STATIC_ALIGN_BYTES=0)
@matlabbe
matlabbe / alice_vision_eigen.patch
Last active August 11, 2021 09:41
Patch for AliceVision integration in RTAB-Map
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7ea43b504..b86462767 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -334,8 +334,8 @@ if(Eigen3_FOUND OR EIGEN3_FOUND)
# message(FATAL_ERROR "EIGEN_INCLUDE_DIR: ${EIGEN_INCLUDE_DIR}")
include_directories(${EIGEN_INCLUDE_DIR})
# See https://eigen.tuxfamily.org/dox/group__TopicUnalignedArrayAssert.html
- add_definitions("-DEIGEN_DONT_ALIGN_STATICALLY=1")
- add_definitions("-DEIGEN_DONT_VECTORIZE=1")
@matlabbe
matlabbe / BoostConfig.cmake.in
Last active April 17, 2021 17:07
Minimal Boost CMake
set(Boost_INCLUDE_DIRS @Boost_INCLUDE_DIRS@)
set(Boost_LIBRARIES @Boost_LIBRARIES@)
link_directories(@Boost_LINK_DIRS@)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} @Boost_C_FLAGS@")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} @Boost_CXX_FLAGS@")
@matlabbe
matlabbe / g2o_ios_fix.patch
Created December 30, 2020 18:52
Fix g2o build on iOS (commit a3f7706bdbb849b2808dc3e1b7aee189f63b498e)
diff --git a/g2o/stuff/filesys_tools.cpp b/g2o/stuff/filesys_tools.cpp
index 29e33fd..6be580e 100644
--- a/g2o/stuff/filesys_tools.cpp
+++ b/g2o/stuff/filesys_tools.cpp
@@ -51,6 +51,7 @@
#ifdef __APPLE__
//#include <chrono>
//#include <thread>
+#include <TargetConditionals.h>
#endif
@matlabbe
matlabbe / gtsam_GKlib_ios_fix.patch
Created December 30, 2020 18:43
Fix gtsam build on ios (commit fbb9d3bdda8b88df51896bc401bfd170573e66f5)
diff --git a/gtsam/3rdparty/metis/GKlib/GKlibSystem.cmake b/gtsam/3rdparty/metis/GKlib/GKlibSystem.cmake
index 7ea5bab94..d5d2eb9e9 100644
--- a/gtsam/3rdparty/metis/GKlib/GKlibSystem.cmake
+++ b/gtsam/3rdparty/metis/GKlib/GKlibSystem.cmake
@@ -28,7 +28,7 @@ if(CYGWIN)
endif(CYGWIN)
if(CMAKE_COMPILER_IS_GNUCC)
# GCC opts.
- set(GKlib_COPTIONS "${GKlib_COPTIONS} -std=c99 -fno-strict-aliasing")
+ set(GKlib_COPTIONS "${GKlib_COPTIONS} -std=c99 -fno-strict-aliasing -fno-zero-initialized-in-bss")