Revision d81c4f8b server/CMakeLists.txt
| 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}
|
| 134 | 94 |
src/main.cpp |
| 135 |
src/MiddlewareRSB.cpp |
|
| 136 | 95 |
src/MiddlewareROS.cpp |
| 137 | 96 |
src/Arbiter.cpp |
| 138 | 97 |
src/Utterance.cpp |
| 139 | 98 |
src/Animation.cpp |
| 140 | 99 |
src/AudioPlayer.cpp |
| 141 |
src/AudioPlayerRSB.cpp |
|
| 142 | 100 |
src/AudioPlayerLibAO.cpp |
| 143 | 101 |
src/MouthConfig.cpp |
| 144 | 102 |
src/EmotionState.cpp |
| ... | ... | |
| 151 | 109 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
| 152 | 110 |
|
| 153 | 111 |
#create example: |
| 154 |
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} ${humotion_LIBRARIES} ${AO_LIBRARIES})
|
|
| 155 | 113 |
set_property(TARGET ${PROJECT_NAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
|
| 156 | 114 |
|
| 157 | 115 |
|
Also available in: Unified diff