-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
30 lines (22 loc) · 925 Bytes
/
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
cmake_minimum_required(VERSION 2.8)
PROJECT(mpu9250_sample)
## Default install prefix : /usr
SET(CMAKE_INSTALL_PREFIX /usr)
option(CMAKE_INSTALL_PREFIX "CMAKE_INSTALL_PREFIX" ${CMAKE_INSTALL_PREFIX})
## Default build type : REALEASE
IF (CMAKE_BUILD_TYPE STREQUAL "")
SET(CMAKE_BUILD_TYPE RELEASE)
ENDIF (CMAKE_BUILD_TYPE STREQUAL "")
option(BUILD_HOST "BUILD TARGET [ HOST / TARGET ]" OFF)
IF( ${BUILD_HOST} STREQUAL "ON" )
add_definitions(-DBUILD_HOST)
ENDIF( ${BUILD_HOST} STREQUAL "ON" )
INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )
SET(EXECUTABLE_OUTPUT_PATH "${mpu9250_sample_BINARY_DIR}/bin")
SET(LIBRARY_OUTPUT_PATH "${mpu9250_sample_BINARY_DIR}/lib")
INCLUDE_DIRECTORIES( include )
ADD_SUBDIRECTORY( thirdparty )
ADD_SUBDIRECTORY( src )
INSTALL(FILES data/mpu9250.sh DESTINATION /etc/init.d/)
INSTALL(FILES data/RTIMULib.ini DESTINATION share/mpu9250/)
INSTALL(FILES bin/low-speed-spidev.ko DESTINATION bin)