-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
87 lines (71 loc) · 2.86 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
cmake_minimum_required(VERSION 2.8.3)
project(rtt_xbotcore)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
find_package(OROCOS-RTT REQUIRED COMPONENTS rtt-scripting rtt-typekit)
if (NOT OROCOS-RTT_FOUND)
message (FATAL_ERROR "\nCould not find Orocos-RTT. Please use the shell command\n 'source orocos_toolchain/env.sh' and then run cmake again.")
endif()
include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake )
set (Eigen_INCLUDE_DIRS "/usr/include/eigen3")
find_package(orocos_kdl REQUIRED)
find_package(Boost COMPONENTS thread REQUIRED)
find_package(srdfdom_advr REQUIRED)
find_package(XBotCoreModel REQUIRED)
find_package(RST-RT REQUIRED)
message(STATUS "RST-RT version: ${RST-RT_VERSION}")
include_directories(BEFORE SYSTEM ${RST-RT_INCLUDE_DIRS})
add_definitions(${RST-RT_CFLAGS})
link_directories(${RST-RT_LIBRARY_DIR} ${RST-RT_LIBRARY_DIRS})
find_package(PkgConfig REQUIRED)
pkg_search_module(TINYXML REQUIRED tinyxml)
if(NOT TINYXML_INCLUDE_DIR)
find_path("/usr/include" tinyxml.h)
find_library(TINYXML_LIBRARY NAMES tinyxml)
set(TINYXML_LIBRARIES ${TINYXML_LIBRARY})
set(TINYXML_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR})
set(TINYXML_LIBRARY_DIR "/usr/lib/x86_64-linux-gnu")
endif()
message(STATUS "TINYXML_VERSION: ${TINYXML_VERSION}")
include_directories(BEFORE SYSTEM ${TINYXML_INCLUDE_DIRS})
link_directories(${TINYXML_LIBRARY_DIR})
message(STATUS "TINYXML_LIBRARIES: ${TINYXML_LIBRARIES}")
message(STATUS "TINYXML_LIBRARY_DIR: ${TINYXML_LIBRARY_DIR}")
message(STATUS "TINYXML_INCLUDE_DIR: ${TINYXML_INCLUDE_DIRS}")
message(STATUS "TINYXML_LIBRARY: ${TINYXML_LIBRARY}")
#include_directories(
# include
# ${Boost_INCLUDE_DIR}
# ${Eigen_INCLUDE_DIRS}
# ${orocos_kdl_INCLUDE_DIRS}
# ${USE_OROCOS_INCLUDE_DIRS}
# ${RST-RT_INCLUDE_DIRS}
# ${TINYXML_INCLUDE_DIRS}
# ${srdfdom_advr_INCLUDE_DIRS}
# ${XBotCoreModel_INCLUDE_DIRS}
#)
#file(GLOB_RECURSE rtt_gazebo_robot_sim_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/include" *.h)
#ADD_LIBRARY(gain_parser SHARED src/parser.cpp)
#TARGET_LINK_LIBRARIES(gain_parser ${TINYXML_LIBRARIES})
#orocos_component(${PROJECT_NAME} src/rtt-gazebo-robot-sim.cpp src/rtt-gazebo-robot-sim_hooks.cpp src/kinematic_chain.cpp
#src/force_torque_sensor.cpp ${rtt_gazebo_robot_sim_INCLUDES})
#set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY COMPILE_DEFINITIONS RTT_COMPONENT)
#target_link_libraries(${PROJECT_NAME}
# gain_parser
# ${USE_OROCOS_LIBRARIES}
# ${orocos_kdl_LIBRARIES}
# ${OROCOS-RTT_LIBRARIES}
# ${Boost_LIBRARIES}
# ${RST-RT_LIBRARIES}
# ${TINYXML_LIBRARIES}
# ${srdfdom_advr_LIBRARIES}
# ${XBotCoreModel_LIBRARIES}
#)
install (TARGETS
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
#orocos_generate_package(INCLUDE_DIRS include)
#######################
# Add Testing target #
#######################
#enable_testing()
#add_subdirectory(tests)