-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
66 lines (53 loc) · 1.97 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
62
63
64
65
66
cmake_minimum_required(VERSION 2.8.3)
project(tue_control)
find_package(catkin REQUIRED COMPONENTS
scl_filters
tue_config
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES tue_control
CATKIN_DEPENDS scl_filters
)
# ------------------------------------------------------------------------------------------------
# BUILD
# ------------------------------------------------------------------------------------------------
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
include_directories(
include
${catkin_INCLUDE_DIRS}
)
set(SOURCE_FILES
src/controller.cpp
src/controller_factory.cpp
src/supervised_controller.cpp
src/setpoint_controller.cpp
src/generic_controller.cpp
)
set(HEADER_FILES
include/tue/control/generic.h
include/tue/control/fsm.h
include/tue/control/controller.h
include/tue/control/controller_input.h
include/tue/control/controller_output.h
include/tue/control/controller_factory.h
include/tue/control/supervised_controller.h
include/tue/control/setpoint_controller.h
include/tue/control/generic_controller.h
)
add_library(tue_control ${SOURCE_FILES} ${HEADER_FILES})
target_link_libraries(tue_control ${catkin_LIBRARIES})
# ------------------------------------------------------------------------------------------------
# TEST
# ------------------------------------------------------------------------------------------------
add_executable(test_controller test/test_controller.cpp)
target_link_libraries(test_controller tue_control)