-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
46 lines (37 loc) · 1.19 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
cmake_minimum_required(VERSION 2.8.11)
project( bbb_robot )
message( ${CMAKE_C_COMPILER} )
message( ${CMAKE_CXX_COMPILER} )
# set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} cmake )
set( VERSION_MAJOR 1 CACHE STRING "Project major version number." )
set( VERSION_MINOR 0 CACHE STRING "Project minor version number." )
set( VERSION_PATCH 0 CACHE STRING "Project patch version number." )
mark_as_advanced(VERSION_MAJOR VERSION_MINOR VERSION_PATCH)
# find_library( PTHREAD pthread )
## set output directory ##
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/ )
add_definitions(-ggdb)
add_definitions(-std=gnu++11)
# add_definitions(-O3)
add_definitions(-Wall)
# add_definitions(-D_GNU_SOURCE=1)
# add_definitions(-pipe)
add_definitions(-fPIC)
# add_definitions(-D__AVR__)
include_directories(
${bbb_robot_SOURCE_DIR}/src
)
## build static library ###
add_library(nxshield STATIC
${bbb_robot_SOURCE_DIR}/src/BaseI2CDevice.cpp
${bbb_robot_SOURCE_DIR}/src/NxShield.cpp
)
include_directories(
${bbb_robot_SOURCE_DIR}/src
)
### build applications ###
add_executable(
nxshield_test
${bbb_robot_SOURCE_DIR}/application/main.cpp
)
target_link_libraries(nxshield_test nxshield)