-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
103 lines (81 loc) · 2.66 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
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}
)
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}
)
ADD_EXECUTABLE(friBiManualRT
fri_dual_rt/fridual_rt.cpp)
target_link_libraries(friBiManualRT
${PROJECT_NAME}_RT
${XENO_NATIVE_LDFLAGS} -lrtdm
${Boost_LIBRARIES}
)
ADD_EXECUTABLE(friBiManualSeqRT
fri_dual_rt/fridualseq_rt.cpp)
target_link_libraries(friBiManualSeqRT
${PROJECT_NAME}_RT
${XENO_NATIVE_LDFLAGS} -lrtdm
${Boost_LIBRARIES}
)
ADD_EXECUTABLE(friFirstAppRT
fri_firstapp_rt/frifirstapp_rt.cpp)
target_link_libraries(friFirstAppRT
${PROJECT_NAME}_RT
${XENO_NATIVE_LDFLAGS} -lrtdm
${Boost_LIBRARIES}
)
ADD_EXECUTABLE(friSecondAppRT
fri_secondapp_rt/frisecondapp_rt.cpp)
target_link_libraries(friSecondAppRT
${PROJECT_NAME}_RT
${XENO_NATIVE_LDFLAGS} -lrtdm
${Boost_LIBRARIES}
)
ADD_EXECUTABLE(friGravCompRT
fri_test_rt/fri_gravitycomp_rt.cpp)
target_link_libraries(friGravCompRT
${PROJECT_NAME}_RT
${XENO_NATIVE_LDFLAGS} -lrtdm
${Boost_LIBRARIES}
)
# 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)