forked from team-vigir/vigir_ocs_common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
61 lines (45 loc) · 1.9 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
cmake_minimum_required(VERSION 2.8.3)
project(vigir_ocs_glance_hub)
## Find catkin and any catkin packages on which
## this package depends at build time
find_package(catkin REQUIRED COMPONENTS roscpp rospy roslib tf std_msgs sensor_msgs vigir_ocs_msgs vigir_footstep_planning_msgs)
## Declare things to be passed to other projects
catkin_package(
INCLUDE_DIRS src
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS roscpp rospy roslib tf std_msgs sensor_msgs vigir_ocs_msgs vigir_footstep_planning_msgs
)
## This plugin includes Qt widgets, so we must include Qt like so:
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
include(${QT_USE_FILE})
## I prefer the Qt signals and slots to avoid defining "emit", "slots",
## etc because they can conflict with boost signals, so define QT_NO_KEYWORDS here.
add_definitions(-DQT_NO_KEYWORDS)
## Here we specify which header files need to be run through "moc",
## Qt's meta-object compiler.
qt4_wrap_cpp(MOC_FILES
src/glancehub.h
)
## Here we add QtCreator ui files
qt4_wrap_ui(UIC_FILES
src/glancehub.ui
)
## Here we specify the list of source files, including the output of
## the previous command which is stored in ``${MOC_FILES}``.
set(SOURCE_FILES
${MOC_FILES}
src/main.cpp
src/glancehub.cpp
)
include_directories(include ${catkin_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} src)
add_executable(glance_hub ${UIC_FILES} ${SOURCE_FILES})
target_link_libraries(glance_hub ${catkin_LIBRARIES} ${QT_LIBRARIES})
add_dependencies(glance_hub ${catkin_EXPORTED_TARGETS})
add_library(${PROJECT_NAME} ${UIC_FILES} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${QT_LIBRARIES})
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
install( TARGETS ${PROJECT_NAME} glance_hub
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)