mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
ios first release
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# Top-Level CmakeLists.txt
|
||||
# For GNUInstallDirs
|
||||
cmake_minimum_required(VERSION 2.8.5)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
PROJECT( RTABMap )
|
||||
SET(PROJECT_PREFIX rtabmap)
|
||||
|
||||
@@ -41,7 +40,13 @@ IF(${CMAKE_GENERATOR} MATCHES ".*Makefiles")
|
||||
ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||
ENDIF(${CMAKE_GENERATOR} MATCHES ".*Makefiles")
|
||||
|
||||
IF(NOT ANDROID)
|
||||
SET(MOBILE_BUILD OFF)
|
||||
IF(ANDROID OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
SET(MOBILE_BUILD ON)
|
||||
ENDIF(ANDROID OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
MESSAGE(STATUS "MOBILE_BUILD=${MOBILE_BUILD}")
|
||||
|
||||
IF(NOT MOBILE_BUILD)
|
||||
SET(CMAKE_DEBUG_POSTFIX "d")
|
||||
option(FLANN_KDTREE_MEM_OPT "Disable multi-threaded FLANN kd-tree to minimize memory allocations" OFF)
|
||||
ELSE()
|
||||
@@ -157,7 +162,7 @@ OPTION(BUILD_TOOLS "Build tools" ON)
|
||||
OPTION(BUILD_EXAMPLES "Build examples" ON)
|
||||
|
||||
####### DEPENDENCIES #######
|
||||
IF(ANDROID)
|
||||
IF(MOBILE_BUILD)
|
||||
option(WITH_QT "Include Qt support" OFF)
|
||||
ELSE()
|
||||
option(WITH_QT "Include Qt support" ON)
|
||||
@@ -204,7 +209,7 @@ option(WITH_VINS "Include VINS-Fusion support" ON)
|
||||
option(WITH_OPENVINS "Include OpenVINS support" ON)
|
||||
option(WITH_MADGWICK "Include Madgwick IMU filtering support" ON)
|
||||
option(WITH_FASTCV "Include FastCV support" ON)
|
||||
IF(ANDROID)
|
||||
IF(MOBILE_BUILD)
|
||||
option(PCL_OMP "With PCL OMP implementations" OFF)
|
||||
ELSE()
|
||||
option(PCL_OMP "With PCL OMP implementations" ON)
|
||||
@@ -249,13 +254,13 @@ endif()
|
||||
# OpenMP ("-fopenmp" should be added for flann included in PCL)
|
||||
# the gcc-4.2.1 coming with MacOS X is not compatible with the OpenMP pragmas we use, so disabling OpenMP for it
|
||||
if((NOT APPLE) OR (NOT CMAKE_COMPILER_IS_GNUCXX) OR (GCC_VERSION VERSION_GREATER 4.2.1) OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
||||
find_package(OpenMP)
|
||||
find_package(OpenMP COMPONENTS C CXX)
|
||||
endif()
|
||||
if(OPENMP_FOUND)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
set(CMAKE_INSTALL_OPENMP_LIBRARIES TRUE)
|
||||
message (STATUS "Found OpenMP")
|
||||
message (STATUS "Found OpenMP: ${OpenMP_CXX_LIBRARIES}")
|
||||
if(PCL_OMP)
|
||||
add_definitions(-DPCL_OMP)
|
||||
endif(PCL_OMP)
|
||||
|
||||
Reference in New Issue
Block a user