-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
127 lines (107 loc) · 2.3 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Project name
project(RESpecTa)
# CMake required version must be >= 2.6
cmake_minimum_required(VERSION 2.6)
# Try to find and setup Qt4 for this project
FIND_PACKAGE(Qt4)
IF(QT_FOUND)
MESSAGE(STATUS "tUsing Qt ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH} (${QT_QMAKE_EXECUTABLE})")
MESSAGE(STATUS "tIncludes in ${QT_INCLUDE_DIR}")
# add Qt modules here, the include will setup QT_LIBRARIES
#
# SET(QT_USE_XXX TRUE)
#
# Possible values are:
# QT_DONT_USE_QTCORE
# QT_DONT_USE_QTGUI
# QT_USE_QT3SUPPORT
# QT_USE_QTASSISTANT
# QT_USE_QAXCONTAINER
# QT_USE_QAXSERVER
# QT_USE_QTDESIGNER
# QT_USE_QTMOTIF
# QT_USE_QTMAIN
# QT_USE_QTNETWORK
# QT_USE_QTNSPLUGIN
# QT_USE_QTOPENGL
# QT_USE_QTSQL
SET(QT_USE_QTXML TRUE)
# QT_USE_QTSVG
# QT_USE_QTTEST
# QT_USE_QTUITOOLS
# QT_USE_QTDBUS
# QT_USE_QTSCRIPT
# QT_USE_QTASSISTANTCLIENT
# QT_USE_QTHELP
# QT_USE_QTWEBKIT
# QT_USE_QTXMLPATTERNS
# QT_USE_PHONON
INCLUDE(${QT_USE_FILE})
# Include current directory, necessary for proper UI headers to work
#include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Source files
SET(GUI_CXX_SRCS
main.cpp
respecta.cpp
diagramscene.cpp
editWidget.cpp
stateWidget.cpp
transWidget.cpp
StateTypeWidgets.cpp
baseState.cpp
Transition.cpp
TransDialog.cpp
Model.cpp
TreeModel.cpp
TreeItem.cpp
States.cpp
subtaskWidget.cpp
myTreeView.cpp
)
# Class headers that have to be MOCed (i.e. classes derived from QObject)
SET(GUI_MOC_SRCS
respecta.h
diagramscene.h
Graph.h
globals.h
Coordinates.h
Pose.h
RobotSet.h
States.h
editWidget.h
stateWidget.h
transWidget.h
StateTypeWidgets.h
baseState.h
TransDialog.h
TreeModel.h
TreeItem.h
myTreeView.h
robotInit.h
subtaskWidget.h
)
# Generate MOC files
QT4_WRAP_CPP(GUI_CXX_SRCS ${GUI_MOC_SRCS})
# UI files
SET(GUI_UI
respecta.ui
)
# Generate UI include files
QT4_WRAP_UI(GUI_CXX_SRCS ${GUI_UI})
QT4_ADD_RESOURCES(GUI_CXX_SRCS diagramscene.qrc)
# Create GUI executable
ADD_EXECUTABLE(RESpecTa ${GUI_CXX_SRCS})
TARGET_LINK_LIBRARIES(RESpecTa ${QT_LIBRARIES})
#SET_TARGET_PROPERTIES(discode_gui PROPERTIES
# BUILD_WITH_INSTALL_RPATH ON
# INSTALL_RPATH_USE_LINK_PATH 1
# INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib
#)
#
#install(
# TARGETS discode_gui
# RUNTIME DESTINATION bin COMPONENT applications
#)
ELSE(QT_FOUND)
MESSAGE("Qt not found! GUI will not be built")
ENDIF(QT_FOUND)