Revision 61ca8481

View differences:

client/cpp/CMakeLists.txt
31 31
#######################################
32 32
FIND_PACKAGE(hlrc_server)
33 33

  
34
#######################################
35
#allow forced disable of RSB
36
option(IGNORE_RSB "IGNORE_RSB" OFF)
37

  
38
#######################################
39
# check if we have RSB support:
40
IF (IGNORE_RSB)
41
    MESSAGE(INFO "RSB disabled per command line flag IGNORE_RSB")
42
ELSE (IGNORE_RSB)
43
FIND_PACKAGE(RSB 0.11 QUIET)
44
IF (RSB_FOUND)
45
    #RSB
46
    SET(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib:\$ORIGIN/")
47
    FIND_PACKAGE(RSC 0.11 REQUIRED)
48
    FIND_PACKAGE(RSB 0.11 REQUIRED)
49
    #RST
50
    FIND_PACKAGE(RST REQUIRED COMPONENTS sandbox)
51
    INCLUDE_DIRECTORIES(BEFORE SYSTEM ${RST_INCLUDE_DIRS})
52
    ADD_DEFINITIONS(${RST_CFLAGS} ${RSTSANDBOX_CFLAGS})
53

  
54
    INCLUDE_DIRECTORIES(BEFORE SYSTEM ${RSB_INCLUDE_DIRS})
55
    LIST(INSERT CMAKE_MODULE_PATH 0 ${RSC_CMAKE_MODULE_PATH})
56
    #RSB
57
    SET(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib:\$ORIGIN/")
58
    FIND_PACKAGE(RSC 0.11 REQUIRED)
59
    FIND_PACKAGE(RSB 0.11 REQUIRED)
60
    #RST
61
    FIND_PACKAGE(RST REQUIRED COMPONENTS sandbox)
62
    INCLUDE_DIRECTORIES(BEFORE SYSTEM ${RST_INCLUDE_DIRS})
63
    ADD_DEFINITIONS(${RST_CFLAGS} ${RSTSANDBOX_CFLAGS})
64

  
65
    INCLUDE_DIRECTORIES(BEFORE SYSTEM ${RSB_INCLUDE_DIRS})
66
    LIST(INSERT CMAKE_MODULE_PATH 0 ${RSC_CMAKE_MODULE_PATH})
67

  
68
    message(STATUS "RSB Support is ON")
69
    add_definitions(-DRSB_SUPPORT=1)
70
ELSE(RSB_FOUND)
71
    message(STATUS "RSB not found.")
72
ENDIF(RSB_FOUND)
73
ENDIF(IGNORE_RSB)
74

  
75 34
################################################################
76 35
# check for ROS support:
77 36
find_package(catkin QUIET)
......
118 77
    src/RobotController.cpp
119 78
    src/Middleware.cpp
120 79
    src/MiddlewareROS.cpp
121
    src/MiddlewareRSB.cpp
122 80
)
123 81

  
124 82
add_library(${HLRC_CLIENT_LIBNAME} SHARED
......
142 100
    add_dependencies(${HLRC_CLIENT_LIBNAME} ${catkin_EXPORTED_TARGETS})
143 101
ENDIF (ROS_FOUND)
144 102

  
145
target_link_libraries(${HLRC_CLIENT_LIBNAME} ${RSB_LIBRARIES} ${RST_LIBRARIES} ${catkin_LIBRARIES})
103
target_link_libraries(${HLRC_CLIENT_LIBNAME} ${RST_LIBRARIES} ${catkin_LIBRARIES})
146 104

  
147 105
#build & install demo
148 106
#ADD_EXECUTABLE(testMarkerTracker example/testMarkerTracker.cc)
......
173 131
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKECONFIGVERSION_FILENAME}" DESTINATION "${DATADIR}")
174 132

  
175 133
#ADD_EXECUTABLE(${PROJECT_NAME} main.cpp ${SRC_FILES})
176
#TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${RSB_LIBRARIES} ${RST_LIBRARIES} ${OpenCV_LIBS} ${Boost_LIBRARIES} ${Boost_LIBS} ${BART_LIBRARIES} )
134
#TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${RST_LIBRARIES} ${OpenCV_LIBS} ${Boost_LIBRARIES} ${Boost_LIBS} ${BART_LIBRARIES} )
177 135

  
178 136
#build & install examples
179 137
ADD_EXECUTABLE(${PROJECT_NAME}_example_random_gaze examples/random_gaze/main.cpp)
server/CMakeLists.txt
10 10
INCLUDE(FindPkgConfig)
11 11

  
12 12
#######################################
13
#allow forced disable of RSB
14
option(IGNORE_RSB "IGNORE_RSB" OFF)
15 13

  
16
#######################################
17
# check if we have RSB support:
18
IF (IGNORE_RSB)
19
    MESSAGE(INFO "RSB disabled per command line flag IGNORE_RSB")
20
ELSE (IGNORE_RSB)
21
FIND_PACKAGE(RSB 0.11 QUIET)
22
IF (RSB_FOUND)
23
    #RSB
24
    SET(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib:\$ORIGIN/")
25
    FIND_PACKAGE(RSC 0.11 REQUIRED)
26
    FIND_PACKAGE(RSB 0.11 REQUIRED)
27
    #RST
28
    FIND_PACKAGE(RST REQUIRED COMPONENTS sandbox)
29
    INCLUDE_DIRECTORIES(BEFORE SYSTEM ${RST_INCLUDE_DIRS})
30
    ADD_DEFINITIONS(${RST_CFLAGS} ${RSTSANDBOX_CFLAGS})
31

  
32
    INCLUDE_DIRECTORIES(BEFORE SYSTEM ${RSB_INCLUDE_DIRS})
33
    LIST(INSERT CMAKE_MODULE_PATH 0 ${RSC_CMAKE_MODULE_PATH})
34
    #RSB
35
    SET(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib:\$ORIGIN/")
36
    FIND_PACKAGE(RSC 0.11 REQUIRED)
37
    FIND_PACKAGE(RSB 0.11 REQUIRED)
38
    #RST
39
    FIND_PACKAGE(RST REQUIRED COMPONENTS sandbox)
40
    INCLUDE_DIRECTORIES(BEFORE SYSTEM ${RST_INCLUDE_DIRS})
41
    ADD_DEFINITIONS(${RST_CFLAGS} ${RSTSANDBOX_CFLAGS})
42

  
43
    INCLUDE_DIRECTORIES(BEFORE SYSTEM ${RSB_INCLUDE_DIRS})
44
    LIST(INSERT CMAKE_MODULE_PATH 0 ${RSC_CMAKE_MODULE_PATH})
45

  
46
    message(STATUS "RSB Support is ON")
47
    add_definitions(-DRSB_SUPPORT=1)
48
ELSE(RSB_FOUND)
49
    message(STATUS "RSB not found.")
50
ENDIF (RSB_FOUND)
51
ENDIF(IGNORE_RSB)
52

  
53
################################################################
54 14
# check for ROS support:
55 15
find_package(catkin QUIET)
56 16
IF (catkin_FOUND)
......
127 87
link_directories(${catkin_LIBRARY_DIRS} ${AO_LIBRARY_DIRS} ${humotion_LIBRARY_DIRS})
128 88

  
129 89
#build dummy list of header files
130
file(GLOB DUMMY_HEADER_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/*.h include/RSB/*.h include/ROS/*.h)
90
file(GLOB DUMMY_HEADER_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/*.h include/ROS/*.h)
131 91

  
132 92
# declare library
133 93
add_executable(${PROJECT_NAME}
......
149 109
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
150 110

  
151 111
#create example:
152
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} ${RSB_LIBRARIES}  ${catkin_LIBRARIES} ${RST_LIBRARIES} ${humotion_LIBRARIES} ${AO_LIBRARIES})
112
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${RST_LIBRARIES} ${humotion_LIBRARIES} ${AO_LIBRARIES})
153 113
set_property(TARGET ${PROJECT_NAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
154 114

  
155 115

  
server/src/Arbiter.cpp
28 28

  
29 29
#include "Arbiter.h"
30 30
#include "AudioPlayerLibAO.h"
31
#include "AudioPlayerRSB.h"
32 31
#include <boost/algorithm/string/predicate.hpp>
33 32
#include <mutex>
34 33
#include <thread>
server/src/main.cpp
26 26
 *
27 27
 */
28 28

  
29
#include "MiddlewareRSB.h"
30 29
#include "MiddlewareROS.h"
31 30
#include "Arbiter.h"
32 31

  
......
45 44
int main(int argc, char* argv[]) {
46 45
	if ((argc != 5) && (argc != 6)) {
47 46
		printf("> ERROR: invalid number of parameters passed to server!\n\nusage: %s <mw_hlrc> <mw_humotion> <base scopename "
48
		       "hlrc> <base scopename humotion> [<audio output>]  (example: %s RSB RSB /flobi1/ pulse )\n",
47
		       "hlrc> <base scopename humotion> [<audio output>]  \n",
49 48
		       argv[0], argv[0]);
50 49
		printf("          audio output is optional and can be {pulse,oss,alsa,null,sndio,..}\n\n");
51 50
		exit(EXIT_FAILURE);
......
77 76
		middleware = new MiddlewareROS(arbiter, scope_hlrc);
78 77
	}
79 78
	else {
80
		middleware = new MiddlewareRSB(arbiter, scope_hlrc);
79
      printf("> ERROR: invalid middleware! Only ROS supported)\n");
81 80
	}
82 81

  
83 82
	// human motion connection:

Also available in: Unified diff