-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
79 lines (65 loc) · 2.46 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
cmake_minimum_required(VERSION 2.8.3)
project(autonomy_image_view)
# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED COMPONENTS rqt_gui rqt_gui_cpp image_transport sensor_msgs geometry_msgs cv_bridge)
if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ")
find_package(Qt5Widgets REQUIRED)
else()
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
include(${QT_USE_FILE})
endif()
set(autonomy_image_view_SRCS
src/autonomy_image_view/image_view.cpp
src/autonomy_image_view/ratio_layouted_frame.cpp
)
set(autonomy_image_view_HDRS
include/autonomy_image_view/image_view.h
include/autonomy_image_view/ratio_layouted_frame.h
)
set(autonomy_image_view_UIS
src/autonomy_image_view/image_view.ui
)
set(autonomy_image_view_INCLUDE_DIRECTORIES
include
${CMAKE_CURRENT_BINARY_DIR}
)
catkin_package(
INCLUDE_DIRS ${autonomy_image_view_INCLUDE_DIRECTORIES}
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS rqt_gui rqt_gui_cpp image_transport sensor_msgs cv_bridge geometry_msgs
)
catkin_python_setup()
if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ")
qt5_wrap_cpp(autonomy_image_view_MOCS ${autonomy_image_view_HDRS})
qt5_wrap_ui(autonomy_image_view_UIS_H ${autonomy_image_view_UIS})
else()
qt4_wrap_cpp(autonomy_image_view_MOCS ${autonomy_image_view_HDRS})
qt4_wrap_ui(autonomy_image_view_UIS_H ${autonomy_image_view_UIS})
endif()
include_directories(${autonomy_image_view_INCLUDE_DIRECTORIES} ${catkin_INCLUDE_DIRS})
add_library(${PROJECT_NAME} ${autonomy_image_view_SRCS} ${autonomy_image_view_MOCS} ${autonomy_image_view_UIS_H})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})
if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ")
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
else()
target_link_libraries(${PROJECT_NAME} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
endif()
find_package(class_loader)
class_loader_hide_library_symbols(${PROJECT_NAME})
install(FILES plugin.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
install(PROGRAMS scripts/autonomy_image_view
DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
install(PROGRAMS scripts/autonomy_image_view
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)