Skip to content

Commit

Permalink
Make SLAM build optional
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinus committed Jun 16, 2016
1 parent 1594d28 commit d38ccab
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild/install")
# move binaries to the same bin directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

option(ODM_BUILD_SLAM "Build SLAM module" OFF)

# Add ODM sub-modules
add_subdirectory(modules)
add_subdirectory(modules)
10 changes: 8 additions & 2 deletions SuperBuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ set(CMAKE_MODULE_PATH ${SB_ROOT_DIR}/cmake)
include(ExternalProject)
include(ExternalProject-Setup)

option(ODM_BUILD_SLAM "Build SLAM module" OFF)


################################
# Setup SuperBuild directories #
Expand Down Expand Up @@ -101,10 +103,14 @@ set(custom_libs OpenGV
CMVS
Catkin
Ecto
PDAL
LAStools
PDAL)

# Dependencies of the SLAM module
if(ODM_BUILD_SLAM)
list(APPEND custom_libs
Pangolin
ORB_SLAM2)
endif()

foreach(lib ${custom_libs})
SETUP_EXTERNAL_PROJECT_CUSTOM(${lib})
Expand Down
4 changes: 2 additions & 2 deletions SuperBuild/cmake/External-OpenCV.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ ExternalProject_Add(${_proj_name}
-DBUILD_opencv_photo=ON
-DBUILD_opencv_legacy=ON
-DBUILD_opencv_python=ON
-DWITH_FFMPEG=ON
-DWITH_FFMPEG=${ODM_BUILD_SLAM}
-DWITH_CUDA=OFF
-DWITH_GTK=ON
-DWITH_GTK=${ODM_BUILD_SLAM}
-DWITH_VTK=OFF
-DWITH_EIGEN=OFF
-DWITH_OPENNI=OFF
Expand Down
4 changes: 3 additions & 1 deletion modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ add_subdirectory(odm_georef)
add_subdirectory(odm_meshing)
add_subdirectory(odm_orthophoto)
add_subdirectory(odm_texturing)
add_subdirectory(odm_slam)
if (ODM_BUILD_SLAM)
add_subdirectory(odm_slam)
endif ()

0 comments on commit d38ccab

Please sign in to comment.