forked from jbohg/kuka_lwr_rtnet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
130 lines (106 loc) · 3.23 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
cmake_minimum_required(VERSION 2.6)
PROJECT(kuka_communication_tools)
execute_process(COMMAND /usr/xenomai/bin/xeno-config --skin=native --cflags OUTPUT_VARIABLE XENO_NATIVE_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND /usr/xenomai/bin/xeno-config --skin=native --ldflags OUTPUT_VARIABLE XENO_NATIVE_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -O3 ${XENO_NATIVE_CFLAGS} -DHAVE_SOCKLEN_T")
#SET(CMAKE_VERBOSE_MAKEFILE on )
find_package(Boost COMPONENTS system filesystem thread REQUIRED)
SET( FRI_REMOTE fri_remote fri_remote_rt)
INCLUDE_DIRECTORIES(include /usr/local/rtnet/include $ENV{LAB_ROOT}/include ${FRI_REMOTE})
LINK_DIRECTORIES(${PROJECT_NAME_BIN}/lib ${Boost_LIBRARY_DIR} $ENV{LAB_ROOT}/lib/x86_64xeno/)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
ADD_LIBRARY(${PROJECT_NAME}
fri_remote/friremote.cpp
fri_remote/friudp.cpp
)
ADD_LIBRARY(${PROJECT_NAME}_RT
fri_remote_rt/friremote_rt.cpp
fri_remote_rt/friudp_rt.cpp
)
ADD_EXECUTABLE(friFirstApp
fri_firstapp/frifirstapp.cpp)
target_link_libraries(friFirstApp
${PROJECT_NAME}
#${XENO_NATIVE_LDFLAGS} -lrtdm
#${Boost_LIBRARIES}
#-lutility
)
ADD_EXECUTABLE(friSecondApp
fri_secondapp/fri_secondapp.cpp)
target_link_libraries(friSecondApp
${PROJECT_NAME}
)
ADD_EXECUTABLE(friTestRT
fri_test_rt/fritest_rt.cpp)
target_link_libraries(friTestRT
${PROJECT_NAME}_RT
${XENO_NATIVE_LDFLAGS} -lrtdm
${Boost_LIBRARIES}
#-lutility
)
# ADD_EXECUTABLE(friBiManualRT
# fri_test_rt/fridual_rt.cpp)
# target_link_libraries(friBiManualRT
# ${PROJECT_NAME}_RT
# ${XENO_NATIVE_LDFLAGS} -lrtdm
# ${Boost_LIBRARIES}
# #-lutility
# )
# ADD_EXECUTABLE(friDualSeqRT
# fri_test_rt/fridualseq_rt.cpp)
# target_link_libraries(friDualSeqRT
# ${PROJECT_NAME}_RT
# ${XENO_NATIVE_LDFLAGS} -lrtdm
# ${Boost_LIBRARIES}
# #-lutility
# )
ADD_EXECUTABLE(friFirstAppRT
fri_firstapp_rt/frifirstapp_rt.cpp)
target_link_libraries(friFirstAppRT
${PROJECT_NAME}_RT
${XENO_NATIVE_LDFLAGS} -lrtdm
${Boost_LIBRARIES}
#-lutility
)
ADD_EXECUTABLE(friSecondAppRT
fri_secondapp_rt/frisecondapp_rt.cpp)
target_link_libraries(friSecondAppRT
${PROJECT_NAME}_RT
${XENO_NATIVE_LDFLAGS} -lrtdm
${Boost_LIBRARIES}
#-lutility
)
ADD_EXECUTABLE(friGravCompRT
fri_secondapp_rt/fri_gravitycomp_rt.cpp)
target_link_libraries(friGravCompRT
${PROJECT_NAME}_RT
${XENO_NATIVE_LDFLAGS} -lrtdm
${Boost_LIBRARIES}
#-lutility
)
ADD_EXECUTABLE(friSineTorqueRT
fri_secondapp_rt/fri_sinetorque_rt.cpp)
target_link_libraries(friSineTorqueRT
${PROJECT_NAME}_RT
${XENO_NATIVE_LDFLAGS} -lrtdm
${Boost_LIBRARIES}
#-lutility
)
ADD_EXECUTABLE(friSABImpedance
fri_secondapp_rt/fri_sab_sample_imp.cpp)
target_link_libraries(friSABImpedance
${PROJECT_NAME}_RT
${XENO_NATIVE_LDFLAGS} -lrtdm
${Boost_LIBRARIES}
#-lutility
)
# add a target to generate API documentation with Doxygen
# find_package(Doxygen)
# if(DOXYGEN_FOUND)
# add_custom_target(doc
# ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile
# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
# COMMENT "Generating API documentation with Doxygen" VERBATIM
# )
# endif(DOXYGEN_FOUND)