aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/CMakeLists.txt
blob: d6bd7e0cf27532419d140e5fd3b78dfab2fdc388 (plain)
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# CMakeLists.txt
#
# $Id$
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org>
# Copyright 1998 Gerald Combs
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#

# All .h files which inherit from QObject aka which use the Q_OBJECT macro
# need to go here.
set(QTSHARK_H_SRC
	byte_view_tab.h
	byte_view_text.h
	capture_file_dialog.h
	capture_info_dialog.h
	capture_interface_dialog.h
	color_dialog.h
	color_utils.h
	display_filter_combo.h
	display_filter_edit.h
	fileset_dialog.h
	interface_tree.h
	label_stack.h
	main_status_bar.h
	main_welcome.h
	main_window.h
	monospace_font.h
	packet_list.h
	packet_list_model.h
	progress_bar.h
	proto_tree.h
	recent_file_status.h
	simple_dialog_qt.h
	wireshark_application.h

	# No Q_OBJECT:
	# packet_list_record.h
	# qt_ui_utils.h
)

set(QTSHARK_CPP_SRC
	byte_view_tab.cpp
	byte_view_text.cpp
	capture_file_dialog.cpp
	capture_info_dialog.cpp
	capture_interface_dialog.cpp
	color_dialog.cpp
	color_utils.cpp
	display_filter_combo.cpp
	display_filter_edit.cpp
	fileset_dialog.cpp
	interface_tree.cpp
	label_stack.cpp
	main.cpp
	main_status_bar.cpp
	main_welcome.cpp
	main_window.cpp
	monospace_font.cpp
	packet_list.cpp
	packet_list_model.cpp
	packet_list_record.cpp
	progress_bar.cpp
	proto_tree.cpp
	qt_ui_utils.cpp
	recent_file_status.cpp
	simple_dialog_qt.cpp
	sparkline_delegate.cpp
	wireshark_application.cpp
)

set(QTSHARK_SRC
	${QTSHARK_CPP_SRC}
)

set(QTSHARK_UI
	main_welcome.ui
	main_window.ui
)

set(QTSHARK_QRC
	../../image/display_filter.qrc
	../../image/status.qrc
	../../image/toolbar.qrc
	i18n.qrc
	welcome.qrc
)

set(QTSHARK_TS
	qtshark_de.ts
	qtshark_fr.ts
)

include_directories(
        ${CMAKE_CURRENT_SOURCE_DIR}
        ${CMAKE_CURRENT_BINARY_DIR}
)

QT4_ADD_TRANSLATION(QTSHARK_TS_QM ${QTSHARK_TS})

QT4_ADD_RESOURCES(QTSHARK_QRC_SRC ${QTSHARK_QRC})

QT4_WRAP_UI(QTSHARK_UI_SRC ${QTSHARK_UI})

# For now, do the moc stuff manually
QT4_WRAP_CPP(QTSHARK_MOC_SRC ${QTSHARK_H_SRC})
# Starting with cmake 2.8.6, we may also use
# set(CMAKE_AUTOMOC TRUE)
# or
# set_target_properties(${some-source-files} PROPERTIES AUTOMOC TRUE)

set(CLEAN_FILES
	${QTSHARK_SRC}
)

if (WERROR)
	set_source_files_properties(
		${CLEAN_FILES}
		PROPERTIES
		COMPILE_FLAGS -Werror
	)
endif()

add_definitions(${QT_DEFINITIONS})

# Get rid of C-only compile flags
remove_definitions(
	-Wdeclaration-after-statement
	-Wno-pointer-sign
	-Wold-style-definition
)

add_library(qtui STATIC
	${QTSHARK_SRC}
	${QTSHARK_UI_SRC}
	${QTSHARK_MOC_SRC}
	${QTSHARK_QRC_SRC}
	${QTSHARK_TS_QM}
)
set_target_properties(qtui PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")

#install(
#	DIRECTORY
#		.
#	DIRECTORY_PERMISSIONS
#		OWNER_EXECUTE OWNER_WRITE OWNER_READ
#		GROUP_EXECUTE GROUP_READ
#		WORLD_EXECUTE WORLD_READ
#	DESTINATION
#		${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME}
#)

#install(TARGETS ui
#	LIBRARY DESTINATION lib
#	RUNTIME DESTINATION lib
#	ARCHIVE DESTINATION lib
#)