forked from swri-robotics/swri_console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
89 lines (78 loc) · 2.42 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
cmake_minimum_required(VERSION 2.8.3)
project(swri_console)
find_package(catkin REQUIRED COMPONENTS rosbag_storage roscpp rosgraph_msgs)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Boost COMPONENTS chrono REQUIRED)
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS rosbag_storage roscpp rosgraph_msgs
)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
include_directories(include
${catkin_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
add_definitions(
${Qt5Core_DEFINITIONS}
${Qt5Gui_DEFINITIONS}
${Qt5Widgets_DEFINITIONS}
)
set(QT_USE_QTCORE TRUE)
set(QT_USE_QTGUI TRUE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
# Build mapviz node
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(src)
file (GLOB UI_FILES
ui/console_window.ui)
file (GLOB HEADER_FILES
include/swri_console/bag_reader.h
include/swri_console/console_master.h
include/swri_console/console_window.h
include/swri_console/log_database.h
include/swri_console/log_database_proxy_model.h
include/swri_console/node_click_handler.h
include/swri_console/node_list_model.h
include/swri_console/rosout_log_loader.h
include/swri_console/ros_thread.h
)
file (GLOB SRC_FILES
src/bag_reader.cpp
src/console_master.cpp
src/console_window.cpp
src/log_database.cpp
src/node_click_handler.cpp
src/node_list_model.cpp
src/log_database_proxy_model.cpp
src/ros_thread.cpp
src/rosout_log_loader.cpp
src/settings_keys.cpp
)
qt5_add_resources(RCC_SRCS resources/images.qrc)
qt5_wrap_ui(SRC_FILES ${UI_FILES})
qt5_wrap_cpp(SRC_FILES ${HEADER_FILES})
add_executable(swri_console ${HEADER_FILES} ${SRC_FILES} ${RCC_SRCS} src/main.cpp)
target_link_libraries(swri_console
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Widgets_LIBRARIES}
${catkin_LIBRARIES}
${Boost_LIBRARIES}
)
catkin_install_python(PROGRAMS scripts/rosout_agg_recorder
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)