MSWSP: add parse_CNatLanguageRestriction()
[wireshark-wip.git] / ui / qt / CMakeLists.txt
bloba2e8829a630999added6550004d8f7a4b01089e3
1 # CMakeLists.txt
3 # $Id$
5 # Wireshark - Network traffic analyzer
6 # By Gerald Combs <gerald@wireshark.org>
7 # Copyright 1998 Gerald Combs
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License
11 # as published by the Free Software Foundation; either version 2
12 # of the License, or (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 # All .h files which inherit from QObject aka which use the Q_OBJECT macro
25 # need to go here.
26 set(QTSHARK_H_SRC
27         accordion_frame.h
28         byte_view_tab.h
29         byte_view_text.h
30         capture_file_dialog.h
31         capture_filter_combo.h
32         capture_filter_edit.h
33         capture_filter_syntax_worker.h
34         capture_info_dialog.h
35         capture_interface_dialog.h
36         capture_preferences_frame.h
37         color_dialog.h
38         color_utils.h
39         column_preferences_frame.h
40         display_filter_combo.h
41         display_filter_edit.h
42         elided_label.h
43         export_dissection_dialog.h
44         export_object_dialog.h
45         file_set_dialog.h
46         filter_expressions_preferences_frame.h
47         follow_stream_dialog.h
48         font_color_preferences_frame.h
49         import_text_dialog.h
50         interface_tree.h
51         label_stack.h
52         layout_preferences_frame.h
53         main_status_bar.h
54         main_welcome.h
55         main_window.h
56         main_window_preferences_frame.h
57         module_preferences_scroll_area.h
58         packet_comment_dialog.h
59         packet_format_group_box.h
60         packet_list.h
61         packet_list_model.h
62         packet_range_group_box.h
63         preferences_dialog.h
64         print_dialog.h
65         profile_dialog.h
66         progress_bar.h
67         proto_tree.h
68         qcustomplot.h
69         recent_file_status.h
70         search_frame.h
71         sequence_diagram.h
72         sequence_dialog.h
73         simple_dialog_qt.h
74         splash_overlay.h
75         summary_dialog.h
76         syntax_line_edit.h
77         tcp_stream_dialog.h
78         time_shift_dialog.h
79         uat_dialog.h
80         wireshark_application.h
82         # No Q_OBJECT:
83         # packet_list_record.h
84         # qt_ui_utils.h
85         # related_packet_delegate.h
86         # sparkline_delegate.h
89 set(CLEAN_FILES
90         accordion_frame.cpp
91         byte_view_tab.cpp
92         byte_view_text.cpp
93         capture_file_dialog.cpp
94         capture_filter_combo.cpp
95         capture_filter_edit.cpp
96         capture_filter_syntax_worker.cpp
97         capture_info_dialog.cpp
98         capture_interface_dialog.cpp
99         color_dialog.cpp
100         color_utils.cpp
101         capture_preferences_frame.cpp
102         column_preferences_frame.cpp
103         display_filter_combo.cpp
104         display_filter_edit.cpp
105         elided_label.cpp
106         export_dissection_dialog.cpp
107         export_object_dialog.cpp
108         file_set_dialog.cpp
109         filter_expressions_preferences_frame.cpp
110         follow_stream_dialog.cpp
111         font_color_preferences_frame.cpp
112         import_text_dialog.cpp
113         interface_tree.cpp
114         label_stack.cpp
115         layout_preferences_frame.cpp
116         main.cpp
117         main_status_bar.cpp
118         main_welcome.cpp
119         main_window.cpp
120         main_window_preferences_frame.cpp
121         main_window_slots.cpp
122         module_preferences_scroll_area.cpp
123         packet_comment_dialog.cpp
124         packet_format_group_box.cpp
125         packet_list.cpp
126         packet_list_model.cpp
127         packet_list_record.cpp
128         packet_range_group_box.cpp
129         preferences_dialog.cpp
130         print_dialog.cpp
131         profile_dialog.cpp
132         progress_bar.cpp
133         proto_tree.cpp
134         qt_ui_utils.cpp
135         recent_file_status.cpp
136         related_packet_delegate.cpp
137         search_frame.cpp
138         sequence_diagram.cpp
139         sequence_dialog.cpp
140         simple_dialog_qt.cpp
141         splash_overlay.cpp
142         sparkline_delegate.cpp
143         summary_dialog.cpp
144         syntax_line_edit.cpp
145         tcp_stream_dialog.cpp
146         time_shift_dialog.cpp
147         uat_dialog.cpp
148         wireshark_application.cpp
151 set(DIRTY_FILES
152         qcustomplot.cpp
155 set(QTSHARK_UI
156         capture_preferences_frame.ui
157         column_preferences_frame.ui
158         export_object_dialog.ui
159         file_set_dialog.ui
160         filter_expressions_preferences_frame.ui
161         follow_stream_dialog.ui
162         font_color_preferences_frame.ui
163         import_text_dialog.ui
164         layout_preferences_frame.ui
165         main_welcome.ui
166         main_window.ui
167         main_window_preferences_frame.ui
168         module_preferences_scroll_area.ui
169         packet_comment_dialog.ui
170         packet_format_group_box.ui
171         packet_range_group_box.ui
172         preferences_dialog.ui
173         print_dialog.ui
174         profile_dialog.ui
175         search_frame.ui
176         sequence_dialog.ui
177         splash_overlay.ui
178         summary_dialog.ui
179         tcp_stream_dialog.ui
180         time_shift_dialog.ui
181         uat_dialog.ui
184 set(QTSHARK_QRC
185         ../../image/display_filter.qrc
186         ../../image/layout.qrc
187         ../../image/status.qrc
188         ../../image/toolbar.qrc
189         i18n.qrc
190         welcome.qrc
193 set(QTSHARK_TS
194         qtshark_de.ts
195         qtshark_fr.ts
196         qtshark_zh_CN.ts
199 include_directories(
200         ${CMAKE_CURRENT_SOURCE_DIR}
201         ${CMAKE_CURRENT_BINARY_DIR}
204 if (QT_VERSION EQUAL 5)
205         QT5_ADD_TRANSLATION(QTSHARK_TS_QM ${QTSHARK_TS})
206         QT5_ADD_RESOURCES(QTSHARK_QRC_SRC ${QTSHARK_QRC})
207         QT5_WRAP_UI(QTSHARK_UI_SRC ${QTSHARK_UI})
208         # For now, do the moc stuff manually
209         QT5_WRAP_CPP(QTSHARK_MOC_SRC ${QTSHARK_H_SRC})
210         # Starting with cmake 2.8.6, we may also use
211         # set(CMAKE_AUTOMOC TRUE)
212         # or
213         # set_target_properties(${some-source-files} PROPERTIES AUTOMOC TRUE)
214 else()
215         QT4_ADD_TRANSLATION(QTSHARK_TS_QM ${QTSHARK_TS})
216         QT4_ADD_RESOURCES(QTSHARK_QRC_SRC ${QTSHARK_QRC})
217         QT4_WRAP_UI(QTSHARK_UI_SRC ${QTSHARK_UI})
218         # For now, do the moc stuff manually
219         QT4_WRAP_CPP(QTSHARK_MOC_SRC ${QTSHARK_H_SRC})
220         # Starting with cmake 2.8.6, we may also use
221         # set(CMAKE_AUTOMOC TRUE)
222         # or
223         # set_target_properties(${some-source-files} PROPERTIES AUTOMOC TRUE)
224 endif()
226 set(QTSHARK_SRC
227         ${CLEAN_FILES}
228         ${DIRTY_FILES}
231 if (WERROR)
232         set_source_files_properties(
233                 ${CLEAN_FILES}
234                 PROPERTIES
235                 COMPILE_FLAGS -Werror
236         )
237         # The Qt headers generate a ton of shortening errors on 64-bit systems.
238         if (CMAKE_SIZEOF_VOID_P EQUAL 8)
239                 set_source_files_properties(
240                         ${CLEAN_FILES}
241                         PROPERTIES
242                         COMPILE_FLAGS -Wno-shorten-64-to-32
243                 )
244         endif()
245 endif()
247 add_definitions(${QT_DEFINITIONS})
249 add_library(qtui STATIC
250         ${QTSHARK_SRC}
251         ${QTSHARK_UI_SRC}
252         ${QTSHARK_MOC_SRC}
253         ${QTSHARK_QRC_SRC}
254         ${QTSHARK_TS_QM}
256 set_target_properties(qtui PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
257 set_target_properties(qtui PROPERTIES FOLDER "UI")