hlrc / server / CMakeLists.txt @ master
History | View | Annotate | Download (3.081 KB)
1 | 0c286af0 | Simon Schulz | cmake_minimum_required(VERSION 2.8.3) |
---|---|---|---|
2 | project(hlrc_server) |
||
3 | |||
4 | INCLUDE(FindPkgConfig) |
||
5 | |||
6 | ####################################### |
||
7 | 9aa2bb7c | semeyerz | |
8 | 0c286af0 | Simon Schulz | # check for ROS support: |
9 | 23fe067c | Robert Haschke | find_package(catkin QUIET) |
10 | 0c286af0 | Simon Schulz | IF (catkin_FOUND) |
11 | SET(ROS_FOUND 1) |
||
12 | |||
13 | 96284eda | Fabian Berthold | find_package(catkin REQUIRED COMPONENTS roscpp std_msgs geometry_msgs sensor_msgs message_generation genmsg actionlib_msgs actionlib tf2_ros tf2_eigen angles humotion) |
14 | 2cf3c285 | Robert Haschke | find_package(PkgConfig REQUIRED) |
15 | pkg_search_module(EIGEN3 REQUIRED eigen3) |
||
16 | 0c286af0 | Simon Schulz | |
17 | message(STATUS "ROS Support is ON") |
||
18 | add_definitions(-DROS_SUPPORT=1) |
||
19 | |||
20 | add_message_files( |
||
21 | FILES |
||
22 | phoneme.msg |
||
23 | soundchunk.msg |
||
24 | b47687f8 | Robert Haschke | utterance.msg |
25 | 0c286af0 | Simon Schulz | ) |
26 | |||
27 | add_service_files( |
||
28 | FILES |
||
29 | ) |
||
30 | |||
31 | add_action_files( |
||
32 | DIRECTORY action |
||
33 | FILES |
||
34 | animation.action |
||
35 | speech.action |
||
36 | utterance.action |
||
37 | b47687f8 | Robert Haschke | tts.action |
38 | 0c286af0 | Simon Schulz | emotionstate.action |
39 | gazetarget.action |
||
40 | b47687f8 | Robert Haschke | lookattarget.action |
41 | 0c286af0 | Simon Schulz | mouthtarget.action |
42 | ) |
||
43 | |||
44 | generate_messages( |
||
45 | DEPENDENCIES |
||
46 | actionlib_msgs |
||
47 | std_msgs |
||
48 | b47687f8 | Robert Haschke | geometry_msgs |
49 | 0c286af0 | Simon Schulz | hlrc_server |
50 | ) |
||
51 | |||
52 | catkin_package( |
||
53 | 96284eda | Fabian Berthold | # INCLUDE_DIRS include |
54 | f0dcf4ca | Robert Haschke | LIBRARIES |
55 | 0c286af0 | Simon Schulz | CATKIN_DEPENDS actionlib_msgs |
56 | #CATKIN_DEPENDS message_runtime |
||
57 | #DEPENDS system_lib |
||
58 | ) |
||
59 | 23fe067c | Robert Haschke | ELSE(catkin_FOUND) |
60 | message(STATUS "ROS not found.") |
||
61 | ENDIF(catkin_FOUND) |
||
62 | 0c286af0 | Simon Schulz | |
63 | add_definitions ("-Wall") |
||
64 | |||
65 | ################################### |
||
66 | # humotion |
||
67 | INCLUDE(FindPkgConfig) |
||
68 | 23fe067c | Robert Haschke | find_package(humotion 0.0.1 REQUIRED) |
69 | message(STATUS "using humotion includes from " ${humotion_INCLUDE_DIRS}) |
||
70 | 0c286af0 | Simon Schulz | |
71 | ################################### |
||
72 | # libao audio |
||
73 | PKG_CHECK_MODULES(AO REQUIRED ao>=1.1.0) |
||
74 | 23fe067c | Robert Haschke | SET(AO_LIBRARY_DIRS "${AO_PREFIX}/lib") |
75 | SET(AO_INCLUDE_DIRS "${AO_PREFIX}/include") |
||
76 | SET(AO_LIBRARIES "ao") |
||
77 | MESSAGE(STATUS "using libao version ${AO_VERSION} from ${AO_PREFIX}") |
||
78 | 0c286af0 | Simon Schulz | |
79 | fc4357ee | Robert Haschke | #build |
80 | include_directories(include ${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} ${humotion_INCLUDE_DIRS} ${AO_INCLUDE_DIRS} ${humotion_INCLUDE_DIRS}) |
||
81 | link_directories(${catkin_LIBRARY_DIRS} ${AO_LIBRARY_DIRS} ${humotion_LIBRARY_DIRS}) |
||
82 | 0c286af0 | Simon Schulz | |
83 | #build dummy list of header files |
||
84 | d81c4f8b | Matthias Barth | file(GLOB DUMMY_HEADER_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/*.h include/ROS/*.h) |
85 | 0c286af0 | Simon Schulz | |
86 | # declare library |
||
87 | add_executable(${PROJECT_NAME} |
||
88 | src/main.cpp |
||
89 | src/MiddlewareROS.cpp |
||
90 | src/Arbiter.cpp |
||
91 | src/Utterance.cpp |
||
92 | src/Animation.cpp |
||
93 | src/AudioPlayer.cpp |
||
94 | src/AudioPlayerLibAO.cpp |
||
95 | src/MouthConfig.cpp |
||
96 | src/EmotionState.cpp |
||
97 | src/EmotionConfig.cpp |
||
98 | src/Middleware.cpp |
||
99 | ${MIDDLEWARE_SOURCES} |
||
100 | ${DUMMY_HEADER_LIST} |
||
101 | ) |
||
102 | |||
103 | #create example: |
||
104 | d81c4f8b | Matthias Barth | target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${humotion_LIBRARIES} ${AO_LIBRARIES}) |
105 | 5303d8b4 | Simon Schulz | set_property(TARGET ${PROJECT_NAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE) |
106 | |||
107 | 0c286af0 | Simon Schulz | |
108 | IF (catkin_FOUND) |
||
109 | add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS} hlrc_server_gencpp) |
||
110 | ENDIF (catkin_FOUND) |
||
111 | |||
112 | # install(TARGETS ${PROJECT_NAME} |
||
113 | # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
||
114 | # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
||
115 | # RUNTIME DESTINATION bin |
||
116 | # ) |
||
117 | |||
118 | install(TARGETS ${PROJECT_NAME} DESTINATION bin) |