forked from introlab/OpenIMU
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
61 lines (43 loc) · 1.67 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
56
57
58
59
60
61
PROJECT (OpenIMU)
SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
SET(BUILD_SHARED_LIBS TRUE)
include(CTest)
include(CheckFunctionExists)
#Look for minimum cmake version
cmake_minimum_required(VERSION 3.0.2)
#DEFINITIONS POLICY, NEW SINCE 3.0.2
cmake_policy(SET CMP0043 NEW)
########################
# Configurations
########################
# compile in debug or release mode
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release)
#SET(CMAKE_BUILD_TYPE Debug)
ENDIF(NOT CMAKE_BUILD_TYPE)
#MINGW or MSVC COMPILE FLAGS
IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX )
MESSAGE( STATUS "Setting flags for GNU GCC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wall")
ENDIF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
IF (MSVC)
MESSAGE( STATUS "Setting flags for Visual Studio")
ENDIF(MSVC)
#Install directory
MESSAGE( STATUS "Windows version: " ${CMAKE_SYSTEM})
SET(CMAKE_INSTALL_PREFIX "$ENV{SYSTEMDRIVE}/OpenIMU-${CMAKE_BUILD_TYPE}")
MESSAGE( STATUS "Install directory is : " ${CMAKE_INSTALL_PREFIX})
MESSAGE( STATUS "PROJECT SOURCE DIR is : " ${CMAKE_SOURCE_DIR})
MESSAGE( STATUS "Current Binary Dir : " ${CMAKE_CURRENT_BINARY_DIR})
#This will enable to output everything in the bin directory for testing and debugging...
SET (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
SET (LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
SET(CMAKE_VERBOSE_MAKEFILE ON)
add_subdirectory(applicationOpenimu)
#add_subdirectory(unitTests)
#add_subdirectory(benchmarks)
#enable_testing(true)
#include_directories(unitTests)
#include_directories(benchmarks)