2016-08-01 14:55:52 +00:00
|
|
|
cmake_minimum_required(VERSION 3.1)
|
2015-11-11 18:25:26 +00:00
|
|
|
|
|
|
|
project(ODM-SuperBuild)
|
|
|
|
|
2018-06-04 00:00:24 +00:00
|
|
|
if (NOT CMAKE_BUILD_TYPE)
|
|
|
|
message(STATUS "No build type selected, default to Release")
|
|
|
|
set(CMAKE_BUILD_TYPE "Release")
|
|
|
|
endif()
|
|
|
|
|
2015-11-16 11:41:44 +00:00
|
|
|
# Setup SuperBuild root location
|
|
|
|
set(SB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
2015-11-11 18:25:26 +00:00
|
|
|
# Path to additional CMake modules
|
2015-11-16 11:41:44 +00:00
|
|
|
set(CMAKE_MODULE_PATH ${SB_ROOT_DIR}/cmake)
|
2015-11-11 18:25:26 +00:00
|
|
|
|
|
|
|
include(ExternalProject)
|
2015-11-11 23:10:41 +00:00
|
|
|
include(ExternalProject-Setup)
|
2015-11-11 18:25:26 +00:00
|
|
|
|
2016-06-16 08:28:12 +00:00
|
|
|
option(ODM_BUILD_SLAM "Build SLAM module" OFF)
|
|
|
|
|
2015-11-16 11:09:29 +00:00
|
|
|
|
2015-11-13 13:42:04 +00:00
|
|
|
################################
|
|
|
|
# Setup SuperBuild directories #
|
|
|
|
################################
|
|
|
|
|
2015-11-11 18:25:26 +00:00
|
|
|
# Setup location where source tar-balls are downloaded
|
2015-11-16 11:41:44 +00:00
|
|
|
set(SB_DOWNLOAD_DIR "${SB_ROOT_DIR}/download"
|
2015-11-12 12:10:20 +00:00
|
|
|
CACHE PATH "Location where source tar-balls are (to be) downloaded.")
|
2015-11-13 08:25:41 +00:00
|
|
|
mark_as_advanced(SB_DOWNLOAD_DIR)
|
|
|
|
|
|
|
|
message(STATUS "SuperBuild files will be downloaded to: ${SB_DOWNLOAD_DIR}")
|
|
|
|
|
2015-11-12 12:10:20 +00:00
|
|
|
|
2015-11-13 08:25:41 +00:00
|
|
|
# Setup location where source tar-balls are located
|
2015-11-16 11:41:44 +00:00
|
|
|
set(SB_SOURCE_DIR "${SB_ROOT_DIR}/src"
|
2015-11-13 08:25:41 +00:00
|
|
|
CACHE PATH "Location where source tar-balls are (will be).")
|
|
|
|
mark_as_advanced(SB_SOURCE_DIR)
|
2015-11-11 18:25:26 +00:00
|
|
|
|
2015-11-13 08:25:41 +00:00
|
|
|
message(STATUS "SuperBuild source files will be extracted to: ${SB_SOURCE_DIR}")
|
2015-11-12 12:10:20 +00:00
|
|
|
|
2015-11-11 18:25:26 +00:00
|
|
|
|
2015-11-13 08:25:41 +00:00
|
|
|
# Setup location where source tar-balls are located
|
2015-11-16 11:41:44 +00:00
|
|
|
set(SB_INSTALL_DIR "${SB_ROOT_DIR}/install"
|
2015-11-13 08:25:41 +00:00
|
|
|
CACHE PATH "Location where source tar-balls are (will be) installed.")
|
|
|
|
mark_as_advanced(SB_SOURCE_DIR)
|
2015-11-11 18:25:26 +00:00
|
|
|
|
2015-11-13 08:25:41 +00:00
|
|
|
message(STATUS "SuperBuild source files will be installed to: ${SB_INSTALL_DIR}")
|
2015-11-12 12:10:20 +00:00
|
|
|
|
2015-11-11 18:25:26 +00:00
|
|
|
|
2015-11-16 11:41:44 +00:00
|
|
|
# Setup location where binary files are located
|
|
|
|
set(SB_BINARY_DIR "${SB_ROOT_DIR}/build"
|
|
|
|
CACHE PATH "Location where files are (will be) located.")
|
|
|
|
mark_as_advanced(SB_BINARY_DIR)
|
|
|
|
|
|
|
|
message(STATUS "SuperBuild binary files will be located to: ${SB_BINARY_DIR}")
|
|
|
|
|
|
|
|
|
2015-11-16 11:09:29 +00:00
|
|
|
#########################################
|
|
|
|
# Download and install third party libs #
|
|
|
|
#########################################
|
2015-11-11 18:25:26 +00:00
|
|
|
|
|
|
|
# ---------------------------------------------------------------------------------------------
|
2015-11-16 11:09:29 +00:00
|
|
|
# Open Source Computer Vision (OpenCV)
|
2015-11-11 18:25:26 +00:00
|
|
|
#
|
2015-11-11 23:10:41 +00:00
|
|
|
set(ODM_OpenCV_Version 2.4.11)
|
|
|
|
option(ODM_BUILD_OpenCV "Force to build OpenCV library" OFF)
|
2015-11-11 18:25:26 +00:00
|
|
|
|
2015-11-13 13:42:04 +00:00
|
|
|
SETUP_EXTERNAL_PROJECT(OpenCV ${ODM_OpenCV_Version} ${ODM_BUILD_OpenCV})
|
2015-11-11 18:25:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------------------------------------
|
|
|
|
# Point Cloud Library (PCL)
|
|
|
|
#
|
2019-03-25 10:19:23 +00:00
|
|
|
set(ODM_PCL_Version 1.8.0)
|
2015-11-11 23:10:41 +00:00
|
|
|
option(ODM_BUILD_PCL "Force to build PCL library" OFF)
|
2015-11-11 18:25:26 +00:00
|
|
|
|
2015-11-13 13:42:04 +00:00
|
|
|
SETUP_EXTERNAL_PROJECT(PCL ${ODM_PCL_Version} ${ODM_BUILD_PCL})
|
2015-11-11 18:25:26 +00:00
|
|
|
|
2015-11-11 23:10:41 +00:00
|
|
|
|
|
|
|
# ---------------------------------------------------------------------------------------------
|
2015-12-15 19:35:58 +00:00
|
|
|
# Google Flags library (GFlags)
|
2015-11-11 23:10:41 +00:00
|
|
|
#
|
2015-12-15 19:35:58 +00:00
|
|
|
set(ODM_GFlags_Version 2.1.2)
|
|
|
|
option(ODM_BUILD_GFlags "Force to build GFlags library" OFF)
|
2015-11-11 23:10:41 +00:00
|
|
|
|
2015-12-15 19:35:58 +00:00
|
|
|
SETUP_EXTERNAL_PROJECT(GFlags ${ODM_GFlags_Version} ${ODM_BUILD_GFlags})
|
2015-11-12 12:10:37 +00:00
|
|
|
|
|
|
|
|
2015-12-15 11:27:49 +00:00
|
|
|
# ---------------------------------------------------------------------------------------------
|
2015-12-15 19:35:58 +00:00
|
|
|
# Ceres Solver
|
2015-12-15 11:27:49 +00:00
|
|
|
#
|
2015-12-15 19:35:58 +00:00
|
|
|
set(ODM_Ceres_Version 1.10.0)
|
|
|
|
option(ODM_BUILD_Ceres "Force to build Ceres library" OFF)
|
2015-12-15 11:27:49 +00:00
|
|
|
|
2015-12-15 19:35:58 +00:00
|
|
|
SETUP_EXTERNAL_PROJECT(Ceres ${ODM_Ceres_Version} ${ODM_BUILD_Ceres})
|
2015-12-15 11:27:49 +00:00
|
|
|
|
|
|
|
|
2017-06-27 16:43:36 +00:00
|
|
|
# ---------------------------------------------------------------------------------------------
|
|
|
|
# Hexer
|
|
|
|
#
|
|
|
|
SETUP_EXTERNAL_PROJECT(Hexer 1.4 ON)
|
2017-04-05 13:41:22 +00:00
|
|
|
|
2015-11-13 15:13:09 +00:00
|
|
|
# ---------------------------------------------------------------------------------------------
|
2015-11-16 11:09:29 +00:00
|
|
|
# Open Geometric Vision (OpenGV)
|
2015-11-12 12:10:37 +00:00
|
|
|
# Open Structure from Motion (OpenSfM)
|
2015-12-11 21:24:52 +00:00
|
|
|
#
|
|
|
|
|
2015-12-14 09:30:57 +00:00
|
|
|
set(custom_libs OpenGV
|
|
|
|
OpenSfM
|
2018-06-18 15:27:33 +00:00
|
|
|
LASzip
|
2019-05-31 14:30:39 +00:00
|
|
|
Zstd
|
2016-03-24 17:35:29 +00:00
|
|
|
PDAL
|
2019-05-31 14:30:39 +00:00
|
|
|
Entwine
|
2016-03-24 17:35:29 +00:00
|
|
|
MvsTexturing
|
|
|
|
)
|
2016-06-16 08:28:12 +00:00
|
|
|
|
|
|
|
# Dependencies of the SLAM module
|
|
|
|
if(ODM_BUILD_SLAM)
|
|
|
|
list(APPEND custom_libs
|
2016-02-03 12:43:21 +00:00
|
|
|
Pangolin
|
|
|
|
ORB_SLAM2)
|
2016-06-16 08:28:12 +00:00
|
|
|
endif()
|
2015-12-14 09:30:57 +00:00
|
|
|
|
|
|
|
foreach(lib ${custom_libs})
|
|
|
|
SETUP_EXTERNAL_PROJECT_CUSTOM(${lib})
|
2015-12-15 19:35:58 +00:00
|
|
|
endforeach()
|
|
|
|
|
2018-12-03 04:31:04 +00:00
|
|
|
## Add mve Build
|
2018-06-27 18:32:49 +00:00
|
|
|
|
2018-07-02 18:02:47 +00:00
|
|
|
externalproject_add(mve
|
2019-06-20 15:20:41 +00:00
|
|
|
GIT_REPOSITORY https://github.com/OpenDroneMap/mve.git
|
|
|
|
GIT_TAG 070
|
2018-06-27 18:32:49 +00:00
|
|
|
UPDATE_COMMAND ""
|
2018-07-02 18:02:47 +00:00
|
|
|
SOURCE_DIR ${SB_SOURCE_DIR}/elibs/mve
|
2018-06-27 18:32:49 +00:00
|
|
|
CONFIGURE_COMMAND ""
|
|
|
|
BUILD_IN_SOURCE 1
|
|
|
|
BUILD_COMMAND make
|
|
|
|
INSTALL_COMMAND ""
|
|
|
|
)
|
|
|
|
|
2018-07-05 23:02:00 +00:00
|
|
|
externalproject_add(poissonrecon
|
|
|
|
GIT_REPOSITORY https://github.com/mkazhdan/PoissonRecon.git
|
2019-08-02 12:00:21 +00:00
|
|
|
GIT_TAG 20b17f5fb49312a4f765a6bcae55d9c4919932f3
|
2018-07-05 23:02:00 +00:00
|
|
|
SOURCE_DIR ${SB_SOURCE_DIR}/PoissonRecon
|
|
|
|
UPDATE_COMMAND ""
|
|
|
|
CONFIGURE_COMMAND ""
|
|
|
|
BUILD_IN_SOURCE 1
|
|
|
|
BUILD_COMMAND make poissonrecon
|
|
|
|
INSTALL_COMMAND ""
|
|
|
|
)
|
2018-10-24 16:30:09 +00:00
|
|
|
|
|
|
|
externalproject_add(dem2mesh
|
|
|
|
GIT_REPOSITORY https://github.com/OpenDroneMap/dem2mesh.git
|
|
|
|
GIT_TAG master
|
|
|
|
SOURCE_DIR ${SB_SOURCE_DIR}/dem2mesh
|
|
|
|
UPDATE_COMMAND ""
|
|
|
|
BUILD_IN_SOURCE 1
|
|
|
|
BUILD_COMMAND make
|
|
|
|
INSTALL_COMMAND ""
|
|
|
|
)
|
2018-10-28 23:57:08 +00:00
|
|
|
|
|
|
|
externalproject_add(dem2points
|
|
|
|
GIT_REPOSITORY https://github.com/OpenDroneMap/dem2points.git
|
|
|
|
GIT_TAG master
|
|
|
|
SOURCE_DIR ${SB_SOURCE_DIR}/dem2points
|
|
|
|
UPDATE_COMMAND ""
|
|
|
|
BUILD_IN_SOURCE 1
|
|
|
|
BUILD_COMMAND make
|
|
|
|
INSTALL_COMMAND ""
|
2018-12-02 17:45:26 +00:00
|
|
|
)
|