-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
56 lines (43 loc) · 1.31 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Pre-requisites about cmake itself
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0005 NEW)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
PROJECT(mrob)
IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release")
ENDIF (NOT CMAKE_BUILD_TYPE)
MESSAGE(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
IF(APPLE)
MESSAGE(STATUS "OSX Architecture: ${CMAKE_OSX_ARCHITECTURES}")
ENDIF(APPLE)
SET(CMAKE_CXX_STANDARD 14)
SET(CMAKE_CXX_EXTENSIONS ON)
if (WIN32)
set(BUILD_SHARED_LIBS OFF)
else()
option(BUILD_SHARED_LIBS "Build shared library" ON)
endif()
SET(MROB_LIB_DIR ${CMAKE_BINARY_DIR}/lib)
#####################################
# Testing option
#####################################
# By default tests are turned off but the value is cached and can be changed in Cmake-GUI
set(BUILD_TESTING false CACHE BOOL "Build unit tests for MROB modules")
MESSAGE(STATUS "Build Tests: ${BUILD_TESTING}")
IF(ANDROID)
SET(BUILD_TESTING false)
ELSE(ANDROID)
IF(BUILD_TESTING)
enable_testing()
ENDIF(BUILD_TESTING)
ENDIF(ANDROID)
#####################################
# External dependencies
#####################################
add_subdirectory(external)
#####################################
# Sources
#####################################
add_subdirectory(src)