forked from eaertbel/expressiongraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
catkin.cmake
62 lines (50 loc) · 1.82 KB
/
catkin.cmake
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(expressiongraph)
find_package(catkin REQUIRED)
find_package(orocos_kdl REQUIRED)
find_package(cmake_modules REQUIRED)
find_package(Eigen REQUIRED)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
DEPENDS orocos_kdl Eigen
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${Eigen_INCLUDE_DIRS}
${orocos_kdl_INCLUDE_DIRS})
# BUILDING AND LINKING LIBRARY
FILE( GLOB EXPRESSIONTREE_SRCS src/[^.]*.cpp src/[^.]*.cxx)
set(EXPRESSIONTREE_SRCS
src/expressiontree_expressions.cpp
src/expressiontree_motionprofiles.cpp
src/expressiontree_rotation.cpp
src/expressiontree_wrench.cpp
src/expressiontree_chain.cpp
src/expressiontree_frame.cpp
src/expressiontree_twist.cpp
src/mptrap.cpp
src/expressiontree_double.cpp
src/expressiontree_mimo.cpp
src/expressiontree_vector.cpp
)
add_library(${PROJECT_NAME} ${EXPRESSIONTREE_SRCS})
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES} ${orocos_kdl_LIBRARIES} ${Eigen_LIBRARIES})
# BUILDING AND LINKING TESTS
catkin_add_gtest(${PROJECT_NAME}_test tests/expressiongraph_test.cpp)
target_link_libraries(${PROJECT_NAME}_test
${catkin_LIBRARIES} ${orocos_kdl_LIBRARIES} ${PROJECT_NAME} ${Eigen_LIBRARIES})
# POTENTIALLY, BUILDING AND LINKING EXAMPLES
OPTION(ENABLE_EXAMPLES "enable compilation of a series of examples" ON)
INCLUDE(${PROJECT_SOURCE_DIR}/examples/CMakeLists.txt)
# INSTALLING LIBRARY AND HEADER-FILES
install(TARGETS ${PROJECT_NAME} ${EXAMPLES}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(DIRECTORY include/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.hpp"
)