-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
66 lines (52 loc) · 2.7 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
##############################################################################
# CMake
##############################################################################
cmake_minimum_required(VERSION 2.8.3)
project(exercise_interface)
##############################################################################
# Catkin
##############################################################################
# qt_build provides the qt cmake glue, roscpp the comms for a default talker
find_package(catkin REQUIRED COMPONENTS
qt_build
roscpp
std_msgs
std_srvs
sensor_msgs
rosbag
myo_raw
) #nao_msgs)
include_directories(${catkin_INCLUDE_DIRS})
# Use this to define what the package will export (e.g. libs, headers).
# Since the default here is to produce only a binary, we don't worry about
# exporting anything.
catkin_package()
##############################################################################
# Qt Environment
##############################################################################
# this comes from qt_build's qt-ros.cmake which is automatically
# included via the dependency call in package.xml
rosbuild_prepare_qt4(QtCore QtGui) # Add the appropriate components to the component list here
##############################################################################
# Sections
##############################################################################
#we dont do anything with .ui though so i dont think this works?
file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.ui)
file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc)
file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/*.h)
QT4_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})
QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS})
QT4_WRAP_CPP(QT_MOC_HPP ${QT_MOC})
##############################################################################
# Sources
##############################################################################
file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS src/master_interface.cpp src/main.cpp)
##############################################################################
# Binaries
##############################################################################
add_executable(exercise_interface ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP})
target_link_libraries(exercise_interface ${QT_LIBRARIES} ${catkin_LIBRARIES})
install(TARGETS exercise_interface RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
add_executable(state_listener src/state_listener_main.cpp)
add_dependencies(state_listener ${catkin_EXPORTED_TARGETS})
target_link_libraries(state_listener ${catkin_LIBRARIES})