-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
65 lines (53 loc) · 1.32 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
cmake_minimum_required(VERSION 3.5)
project(rviz_embed_test)
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rviz_common REQUIRED)
find_package(rviz_default_plugins REQUIRED)
find_package(rviz_ogre_vendor REQUIRED)
find_package(rviz_rendering REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Widgets Core)
set(THIS_PACKAGE_INCLUDE_DEPENDS
rclcpp
rclcpp_components
rviz_common
rviz_default_plugins
rviz_ogre_vendor
rviz_rendering
)
include_directories(
include
${rclcpp_INCLUDE_DIRS}
${rviz_common_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(headers_to_moc
include/myviz/myviz.hpp
)
foreach(header "${headers_to_moc}")
qt5_wrap_cpp(moc_files "${header}")
endforeach()
set(SRC_FILES
src/myviz.cpp
src/main.cpp
${moc_files}
)
add_executable(${PROJECT_NAME} ${SRC_FILES})
ament_target_dependencies(${PROJECT_NAME} ${THIS_PACKAGE_INCLUDE_DEPENDS})
target_link_libraries(${PROJECT_NAME}
Qt5::Core
Qt5::Widgets
rviz_common::rviz_common
rviz_rendering::rviz_rendering
rviz_ogre_vendor::OgreMain
rviz_ogre_vendor::OgreOverlay
)
## Install
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION lib/${PROJECT_NAME})
ament_package()