-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
50 lines (37 loc) · 1.4 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
cmake_minimum_required(VERSION 2.8)
project(rtt_gazebo_embedded)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-std=c++11")
# okay, this is a truely scary hack. Apparently there is a bug in rtt.
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_definitions(-DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG)
endif()
find_package(gazebo REQUIRED)
if(NOT ${gazebo_VERSION_MAJOR})
# Old gazebo version (<=indigo)
set(gazebo_VERSION_MAJOR 5)
endif()
add_definitions(-DGAZEBO_MAJOR_VERSION=${gazebo_VERSION_MAJOR})
find_package(OROCOS-RTT REQUIRED COMPONENTS)
include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake )
find_path(TINYXML_INCLUDE_DIR NAMES tinyxml.h)
find_library(TINYXML_LIBRARIES NAMES tinyxml)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TINYXML DEFAULT_MSG TINYXML_LIBRARIES TINYXML_INCLUDE_DIR)
mark_as_advanced(TINYXML_INCLUDE_DIR TINYXML_LIBRARIES)
set(TINYXML_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR})
include_directories(
include
${GAZEBO_INCLUDE_DIRS}
${USE_OROCOS_INCLUDE_DIRS}
${TINYXML_INCLUDE_DIRS}
)
orocos_component(${PROJECT_NAME} src/${PROJECT_NAME}.cc)
target_link_libraries(${PROJECT_NAME} ${GAZEBO_LIBRARIES} ${USE_OROCOS_LIBRARIES} ${TINYXML_LIBRARIES})
add_subdirectory(example)
orocos_install_headers(FILES include/${PROJECT_NAME}/rtt_gazebo_embedded.hh)
orocos_generate_package(
INCLUDE_DIRS include
)