-
Notifications
You must be signed in to change notification settings - Fork 32
/
CMakeLists.txt
62 lines (52 loc) · 1.39 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
cmake_minimum_required(VERSION 2.8.3)
project(or_urdf)
list(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/cmake")
find_package(catkin REQUIRED COMPONENTS
roslib
srdfdom
urdf
)
find_package(Boost REQUIRED COMPONENTS
filesystem
system
)
find_package(OpenRAVE REQUIRED)
find_package(TinyXML2 REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
catkin_package()
catkin_add_env_hooks("20.${PROJECT_NAME}"
SHELLS sh
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/catkin-env-hooks"
)
include_directories(
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${TinyXML2_INCLUDE_DIRS}
${OpenRAVE_INCLUDE_DIRS}
)
link_directories(
${Boost_LIBRARY_DIRS}
${catkin_LIBRARY_DIRS}
${OpenRAVE_LIBRARY_DIRS}
)
add_library("${PROJECT_NAME}_plugin" MODULE
src/urdf_loader.cpp
src/catkin_finder.cpp
)
set_target_properties(${PROJECT_NAME}_plugin PROPERTIES
PREFIX ""
COMPILE_FLAGS "${OpenRAVE_CXX_FLAGS}"
LINK_FLAGS "${OpenRAVE_LINK_FLAGS}"
LIBRARY_OUTPUT_DIRECTORY
"${CATKIN_DEVEL_PREFIX}/lib/openrave-${OpenRAVE_LIBRARY_SUFFIX}")
target_link_libraries("${PROJECT_NAME}_plugin"
${catkin_LIBRARIES}
${TinyXML2_LIBRARIES}
${OpenRAVE_LIBRARIES}
)
if(CATKIN_ENABLE_TESTING)
catkin_add_nosetests(tests)
endif(CATKIN_ENABLE_TESTING)
install(TARGETS "${PROJECT_NAME}_plugin"
LIBRARY DESTINATION "lib/openrave-${OpenRAVE_LIBRARY_SUFFIX}"
)