Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / ui / qt / CMakeLists.txt
blob1b955adbd1e0af561d2a3c7cd5eaf41ebbe03904
1 # CMakeLists.txt
3 # Wireshark - Network traffic analyzer
4 # By Gerald Combs <gerald@wireshark.org>
5 # Copyright 1998 Gerald Combs
7 # SPDX-License-Identifier: GPL-2.0-or-later
10 if(USE_qt6)
11         set(qtver "6")
12 else()
13         set(qtver "5")
14 endif()
16 ADD_CUSTOM_CMAKE_INCLUDE()
18 set(WIRESHARK_WIDGET_HEADERS
19         widgets/additional_toolbar.h
20         widgets/apply_line_edit.h
21         widgets/byte_view_text.h
22         widgets/capture_filter_combo.h
23         widgets/capture_filter_edit.h
24         widgets/clickable_label.h
25         widgets/compression_group_box.h
26         widgets/copy_from_profile_button.h
27         widgets/detachable_tabwidget.h
28         widgets/display_filter_combo.h
29         widgets/display_filter_edit.h
30         widgets/dissector_syntax_line_edit.h
31         widgets/dissector_tables_view.h
32         widgets/drag_drop_toolbar.h
33         widgets/drag_label.h
34         widgets/editor_file_dialog.h
35         widgets/elided_label.h
36         widgets/expert_info_view.h
37         widgets/export_objects_view.h
38         widgets/field_filter_edit.h
39         widgets/filter_expression_toolbar.h
40         widgets/find_line_edit.h
41         widgets/follow_stream_text.h
42         widgets/interface_toolbar_lineedit.h
43         widgets/label_stack.h
44         widgets/overlay_scroll_bar.h
45         widgets/packet_list_header.h
46         widgets/path_selection_edit.h
47         widgets/pref_module_view.h
48         widgets/profile_tree_view.h
49         widgets/qcp_axis_ticker_elided.h
50         widgets/qcp_axis_ticker_si.h
51         widgets/qcp_string_legend_item.h
52         widgets/range_syntax_lineedit.h
53         widgets/resize_header_view.h
54         widgets/resolved_addresses_view.h
55         widgets/rowmove_tree_view.h
56         widgets/rtp_audio_graph.h
57         widgets/splash_overlay.h
58         widgets/stock_icon_tool_button.h
59         widgets/syntax_line_edit.h
60         widgets/tabnav_tree_view.h
61         widgets/traffic_tab.h
62         widgets/traffic_tree.h
63         widgets/traffic_types_list.h
64         widgets/wireless_timeline.h
65         widgets/wireshark_file_dialog.h
68 set(WIRESHARK_3RD_PARTY_WIDGET_HEADERS
69         widgets/qcustomplot.h
72 set(WIRESHARK_MANAGER_HEADERS
73         manager/preference_manager.h
74         manager/wireshark_preference.h
77 set(WIRESHARK_UTILS_HEADERS
78         utils/color_utils.h
79         utils/data_printer.h
80         utils/field_information.h
81         utils/frame_information.h
82         utils/idata_printable.h
83         utils/profile_switcher.h
84         utils/proto_node.h
85         utils/qt_ui_utils.h
86         utils/rtp_audio_file.h
87         utils/rtp_audio_routing_filter.h
88         utils/rtp_audio_routing.h
89         utils/rtp_audio_silence_generator.h
90         utils/stock_icon.h
91         utils/tango_colors.h
92         utils/variant_pointer.h
93         utils/wireshark_mime_data.h
94         utils/wireshark_zip_helper.h
97 set(WIRESHARK_MODEL_HEADERS
98         models/astringlist_list_model.h
99         models/atap_data_model.h
100         models/cache_proxy_model.h
101         models/coloring_rules_delegate.h
102         models/coloring_rules_model.h
103         models/column_list_model.h
104         models/credentials_model.h
105         models/decode_as_delegate.h
106         models/decode_as_model.h
107         models/dissector_tables_model.h
108         models/enabled_protocols_model.h
109         models/expert_info_model.h
110         models/expert_info_proxy_model.h
111         models/export_objects_model.h
112         models/fileset_entry_model.h
113         models/filter_list_model.h
114         models/info_proxy_model.h
115         models/interface_sort_filter_model.h
116         models/interface_tree_cache_model.h
117         models/interface_tree_model.h
118         models/manuf_table_model.h
119         models/numeric_value_chooser_delegate.h
120         models/packet_list_model.h
121         models/packet_list_record.h
122         models/path_selection_delegate.h
123         models/percent_bar_delegate.h
124         models/pref_delegate.h
125         models/pref_models.h
126         models/profile_model.h
127         models/proto_tree_model.h
128         models/related_packet_delegate.h
129         models/resolved_addresses_models.h
130         models/sparkline_delegate.h
131         models/supported_protocols_model.h
132         models/timeline_delegate.h
133         models/tree_model_helpers.h
134         models/uat_delegate.h
135         models/uat_model.h
136         models/url_link_delegate.h
137         models/voip_calls_info_model.h
140 # All .h files which inherit from QObject aka which use the Q_OBJECT macro
141 # need to go here.
142 set(WIRESHARK_QT_HEADERS
143         about_dialog.h
144         accordion_frame.h
145         address_editor_frame.h
146         bluetooth_att_server_attributes_dialog.h
147         bluetooth_device_dialog.h
148         bluetooth_devices_dialog.h
149         bluetooth_hci_summary_dialog.h
150         byte_view_tab.h
151         capture_comment_dialog.h
152         capture_file_dialog.h
153         capture_file_properties_dialog.h
154         capture_file.h
155         capture_filter_syntax_worker.h
156         capture_options_dialog.h
157         capture_preferences_frame.h
158         coloring_rules_dialog.h
159         column_editor_frame.h
160         column_preferences_frame.h
161         compiled_filter_output.h
162         conversation_colorize_action.h
163         conversation_dialog.h
164         conversation_hash_tables_dialog.h
165         credentials_dialog.h
166         decode_as_dialog.h
167         display_filter_expression_dialog.h
168         dissector_tables_dialog.h
169         enabled_protocols_dialog.h
170         endpoint_dialog.h
171         expert_info_dialog.h
172         export_dissection_dialog.h
173         export_object_action.h
174         export_object_dialog.h
175         export_pdu_dialog.h
176         extcap_argument_file.h
177         extcap_argument_multiselect.h
178         extcap_argument.h
179         extcap_options_dialog.h
180         file_set_dialog.h
181         filter_action.h
182         filter_dialog.h
183         filter_expression_frame.h
184         firewall_rules_dialog.h
185         follow_stream_action.h
186         follow_stream_dialog.h
187         font_color_preferences_frame.h
188         funnel_statistics.h
189         funnel_string_dialog.h
190         funnel_text_dialog.h
191         geometry_state_dialog.h
192         glib_mainloop_on_qeventloop.h
193         gsm_map_summary_dialog.h
194         iax2_analysis_dialog.h
195         import_text_dialog.h
196         interface_frame.h
197         interface_toolbar_reader.h
198         interface_toolbar.h
199         io_console_dialog.h
200         io_graph_action.h
201         io_graph_dialog.h
202         layout_preferences_frame.h
203         lbm_lbtrm_transport_dialog.h
204         lbm_lbtru_transport_dialog.h
205         lbm_stream_dialog.h
206         lte_mac_statistics_dialog.h
207         lte_rlc_graph_dialog.h
208         lte_rlc_statistics_dialog.h
209         main_application.h
210         main_status_bar.h
211         main_window_preferences_frame.h
212         main_window.h
213         manage_interfaces_dialog.h
214         manuf_dialog.h
215         module_preferences_scroll_area.h
216         mtp3_summary_dialog.h
217         multicast_statistics_dialog.h
218         packet_comment_dialog.h
219         packet_diagram.h
220         packet_dialog.h
221         packet_format_group_box.h
222         packet_list.h
223         packet_range_group_box.h
224         preference_editor_frame.h
225         preferences_dialog.h
226         print_dialog.h
227         profile_dialog.h
228         progress_frame.h
229         proto_tree.h
230         protocol_hierarchy_dialog.h
231         protocol_preferences_menu.h
232         recent_file_status.h
233         resolved_addresses_dialog.h
234         response_time_delay_dialog.h
235         rpc_service_response_time_dialog.h
236         rsa_keys_frame.h
237         rtp_analysis_dialog.h
238         rtp_audio_stream.h
239         rtp_player_dialog.h
240         rtp_stream_dialog.h
241         scsi_service_response_time_dialog.h
242         sctp_all_assocs_dialog.h
243         sctp_assoc_analyse_dialog.h
244         sctp_chunk_statistics_dialog.h
245         sctp_graph_arwnd_dialog.h
246         sctp_graph_byte_dialog.h
247         sctp_graph_dialog.h
248         search_frame.h
249         sequence_diagram.h
250         sequence_dialog.h
251         service_response_time_dialog.h
252         show_packet_bytes_dialog.h
253         simple_statistics_dialog.h
254         tlskeylog_launcher_dialog.h
255         stats_tree_dialog.h
256         strip_headers_dialog.h
257         supported_protocols_dialog.h
258         tabnav_tree_widget.h
259         tap_parameter_dialog.h
260         tcp_stream_dialog.h
261         time_shift_dialog.h
262         traffic_table_dialog.h
263         uat_dialog.h
264         uat_frame.h
265         voip_calls_dialog.h
266         welcome_page.h
267         wireless_frame.h
268         wireshark_application.h
269         wireshark_dialog.h
270         wireshark_main_window.h
271         wlan_statistics_dialog.h
272         ${WIRESHARK_CUSTOM_QT_HEADERS}
275 if(ENABLE_PCAP)
276         list(APPEND WIRESHARK_QT_HEADERS
277                 capture_info_dialog.h
278         )
279         if(HAVE_PCAP_REMOTE)
280                 list(APPEND WIRESHARK_QT_HEADERS
281                         remote_capture_dialog.h
282                         remote_settings_dialog.h
283                 )
284         endif()
285 endif()
287 set(WIRESHARK_WIDGET_SRCS
288         widgets/additional_toolbar.cpp
289         widgets/apply_line_edit.cpp
290         widgets/byte_view_text.cpp
291         widgets/capture_filter_combo.cpp
292         widgets/capture_filter_edit.cpp
293         widgets/clickable_label.cpp
294         widgets/compression_group_box.cpp
295         widgets/copy_from_profile_button.cpp
296         widgets/detachable_tabwidget.cpp
297         widgets/display_filter_combo.cpp
298         widgets/display_filter_edit.cpp
299         widgets/dissector_syntax_line_edit.cpp
300         widgets/dissector_tables_view.cpp
301         widgets/drag_drop_toolbar.cpp
302         widgets/drag_label.cpp
303         widgets/editor_file_dialog.cpp
304         widgets/elided_label.cpp
305         widgets/expert_info_view.cpp
306         widgets/export_objects_view.cpp
307         widgets/field_filter_edit.cpp
308         widgets/filter_expression_toolbar.cpp
309         widgets/find_line_edit.cpp
310         widgets/follow_stream_text.cpp
311         widgets/interface_toolbar_lineedit.cpp
312         widgets/label_stack.cpp
313         widgets/overlay_scroll_bar.cpp
314         widgets/packet_list_header.cpp
315         widgets/path_selection_edit.cpp
316         widgets/pref_module_view.cpp
317         widgets/profile_tree_view.cpp
318         widgets/qcp_axis_ticker_elided.cpp
319         widgets/qcp_axis_ticker_si.cpp
320         widgets/qcp_string_legend_item.cpp
321         widgets/range_syntax_lineedit.cpp
322         widgets/resize_header_view.cpp
323         widgets/resolved_addresses_view.cpp
324         widgets/rowmove_tree_view.cpp
325         widgets/rtp_audio_graph.cpp
326         widgets/splash_overlay.cpp
327         widgets/stock_icon_tool_button.cpp
328         widgets/syntax_line_edit.cpp
329         widgets/tabnav_tree_view.cpp
330         widgets/traffic_tab.cpp
331         widgets/traffic_tree.cpp
332         widgets/traffic_types_list.cpp
333         widgets/wireless_timeline.cpp
334         widgets/wireshark_file_dialog.cpp
337 set(WIRESHARK_3RD_PARTY_WIDGET_SRCS
338         widgets/qcustomplot.cpp
341 set(WIRESHARK_MANAGER_SRCS
342         manager/preference_manager.cpp
343         manager/wireshark_preference.cpp
346 set(WIRESHARK_UTILS_SRCS
347         utils/color_utils.cpp
348         utils/data_printer.cpp
349         utils/field_information.cpp
350         utils/frame_information.cpp
351         utils/profile_switcher.cpp
352         utils/proto_node.cpp
353         utils/qt_ui_utils.cpp
354         utils/rtp_audio_file.cpp
355         utils/rtp_audio_routing_filter.cpp
356         utils/rtp_audio_routing.cpp
357         utils/rtp_audio_silence_generator.cpp
358         utils/stock_icon.cpp
359         utils/wireshark_mime_data.cpp
360         utils/wireshark_zip_helper.cpp
363 set(WIRESHARK_MODEL_SRCS
364         models/astringlist_list_model.cpp
365         models/atap_data_model.cpp
366         models/cache_proxy_model.cpp
367         models/coloring_rules_delegate.cpp
368         models/coloring_rules_model.cpp
369         models/column_list_model.cpp
370         models/credentials_model.cpp
371         models/decode_as_delegate.cpp
372         models/decode_as_model.cpp
373         models/dissector_tables_model.cpp
374         models/enabled_protocols_model.cpp
375         models/expert_info_model.cpp
376         models/expert_info_proxy_model.cpp
377         models/export_objects_model.cpp
378         models/fileset_entry_model.cpp
379         models/filter_list_model.cpp
380         models/info_proxy_model.cpp
381         models/interface_sort_filter_model.cpp
382         models/interface_tree_cache_model.cpp
383         models/interface_tree_model.cpp
384         models/manuf_table_model.cpp
385         models/numeric_value_chooser_delegate.cpp
386         models/packet_list_model.cpp
387         models/packet_list_record.cpp
388         models/path_selection_delegate.cpp
389         models/percent_bar_delegate.cpp
390         models/pref_delegate.cpp
391         models/pref_models.cpp
392         models/profile_model.cpp
393         models/proto_tree_model.cpp
394         models/related_packet_delegate.cpp
395         models/resolved_addresses_models.cpp
396         models/sparkline_delegate.cpp
397         models/supported_protocols_model.cpp
398         models/timeline_delegate.cpp
399         models/uat_delegate.cpp
400         models/uat_model.cpp
401         models/url_link_delegate.cpp
402         models/voip_calls_info_model.cpp
405 set(WIRESHARK_QT_SRC
406         about_dialog.cpp
407         accordion_frame.cpp
408         address_editor_frame.cpp
409         bluetooth_att_server_attributes_dialog.cpp
410         bluetooth_device_dialog.cpp
411         bluetooth_devices_dialog.cpp
412         bluetooth_hci_summary_dialog.cpp
413         byte_view_tab.cpp
414         capture_comment_dialog.cpp
415         capture_file_dialog.cpp
416         capture_file_properties_dialog.cpp
417         capture_file.cpp
418         capture_filter_syntax_worker.cpp
419         capture_options_dialog.cpp
420         capture_preferences_frame.cpp
421         coloring_rules_dialog.cpp
422         column_editor_frame.cpp
423         column_preferences_frame.cpp
424         compiled_filter_output.cpp
425         conversation_colorize_action.cpp
426         conversation_dialog.cpp
427         conversation_hash_tables_dialog.cpp
428         credentials_dialog.cpp
429         decode_as_dialog.cpp
430         display_filter_expression_dialog.cpp
431         dissector_tables_dialog.cpp
432         enabled_protocols_dialog.cpp
433         endpoint_dialog.cpp
434         export_dissection_dialog.cpp
435         export_object_action.cpp
436         export_object_dialog.cpp
437         export_pdu_dialog.cpp
438         extcap_argument_file.cpp
439         extcap_argument_multiselect.cpp
440         extcap_argument.cpp
441         extcap_options_dialog.cpp
442         file_set_dialog.cpp
443         filter_action.cpp
444         filter_dialog.cpp
445         filter_expression_frame.cpp
446         firewall_rules_dialog.cpp
447         follow_stream_action.cpp
448         follow_stream_dialog.cpp
449         font_color_preferences_frame.cpp
450         funnel_string_dialog.cpp
451         funnel_text_dialog.cpp
452         geometry_state_dialog.cpp
453         glib_mainloop_on_qeventloop.cpp
454         iax2_analysis_dialog.cpp
455         import_text_dialog.cpp
456         interface_frame.cpp
457         interface_toolbar_reader.cpp
458         interface_toolbar.cpp
459         io_console_dialog.cpp
460         io_graph_action.cpp
461         layout_preferences_frame.cpp
462         lbm_lbtrm_transport_dialog.cpp
463         lbm_lbtru_transport_dialog.cpp
464         lbm_stream_dialog.cpp
465         lte_mac_statistics_dialog.cpp
466         lte_rlc_graph_dialog.cpp
467         lte_rlc_statistics_dialog.cpp
468         main_application.cpp
469         main_status_bar.cpp
470         main_window_layout.cpp
471         main_window_preferences_frame.cpp
472         main_window.cpp
473         main.cpp
474         manage_interfaces_dialog.cpp
475         manuf_dialog.cpp
476         module_preferences_scroll_area.cpp
477         packet_comment_dialog.cpp
478         packet_diagram.cpp
479         packet_dialog.cpp
480         packet_format_group_box.cpp
481         packet_list.cpp
482         packet_range_group_box.cpp
483         preference_editor_frame.cpp
484         preferences_dialog.cpp
485         print_dialog.cpp
486         profile_dialog.cpp
487         progress_frame.cpp
488         proto_tree.cpp
489         protocol_hierarchy_dialog.cpp
490         protocol_preferences_menu.cpp
491         recent_file_status.cpp
492         resolved_addresses_dialog.cpp
493         response_time_delay_dialog.cpp
494         rpc_service_response_time_dialog.cpp
495         rsa_keys_frame.cpp
496         rtp_analysis_dialog.cpp
497         rtp_audio_stream.cpp
498         rtp_player_dialog.cpp
499         rtp_stream_dialog.cpp
500         scsi_service_response_time_dialog.cpp
501         sctp_all_assocs_dialog.cpp
502         sctp_assoc_analyse_dialog.cpp
503         sctp_chunk_statistics_dialog.cpp
504         sctp_graph_arwnd_dialog.cpp
505         sctp_graph_byte_dialog.cpp
506         sctp_graph_dialog.cpp
507         search_frame.cpp
508         sequence_diagram.cpp
509         sequence_dialog.cpp
510         service_response_time_dialog.cpp
511         show_packet_bytes_dialog.cpp
512         simple_dialog.cpp
513         simple_statistics_dialog.cpp
514         tlskeylog_launcher_dialog.cpp
515         strip_headers_dialog.cpp
516         supported_protocols_dialog.cpp
517         tabnav_tree_widget.cpp
518         tap_parameter_dialog.cpp
519         tcp_stream_dialog.cpp
520         time_shift_dialog.cpp
521         traffic_table_dialog.cpp
522         uat_dialog.cpp
523         uat_frame.cpp
524         voip_calls_dialog.cpp
525         welcome_page.cpp
526         wireless_frame.cpp
527         wireshark_application.cpp
528         wireshark_dialog.cpp
529         wireshark_main_window.cpp
530         wireshark_main_window_slots.cpp
531         ${WIRESHARK_CUSTOM_QT_SRCS}
534 if(ENABLE_PCAP)
535         list(APPEND WIRESHARK_QT_SRC
536                 capture_info_dialog.cpp
537         )
538         if(HAVE_PCAP_REMOTE)
539                 list(APPEND WIRESHARK_QT_SRC
540                         remote_capture_dialog.cpp
541                         remote_settings_dialog.cpp
542                 )
543         endif()
544 endif()
546 set(WIRESHARK_QT_TAP_SRC
547         ${CMAKE_CURRENT_SOURCE_DIR}/expert_info_dialog.cpp
548         ${CMAKE_CURRENT_SOURCE_DIR}/funnel_statistics.cpp
549         ${CMAKE_CURRENT_SOURCE_DIR}/gsm_map_summary_dialog.cpp
550         ${CMAKE_CURRENT_SOURCE_DIR}/io_graph_dialog.cpp
551         ${CMAKE_CURRENT_SOURCE_DIR}/lte_mac_statistics_dialog.cpp
552         ${CMAKE_CURRENT_SOURCE_DIR}/lte_rlc_statistics_dialog.cpp
553         ${CMAKE_CURRENT_SOURCE_DIR}/mtp3_summary_dialog.cpp
554         ${CMAKE_CURRENT_SOURCE_DIR}/multicast_statistics_dialog.cpp
555         ${CMAKE_CURRENT_SOURCE_DIR}/rtp_stream_dialog.cpp
556         ${CMAKE_CURRENT_SOURCE_DIR}/sctp_all_assocs_dialog.cpp
557         ${CMAKE_CURRENT_SOURCE_DIR}/sctp_assoc_analyse_dialog.cpp
558         ${CMAKE_CURRENT_SOURCE_DIR}/stats_tree_dialog.cpp
559         ${CMAKE_CURRENT_SOURCE_DIR}/wlan_statistics_dialog.cpp
560         ${WIRESHARK_CUSTOM_TAP_SRC}
563 set(WIRESHARK_QT_NONGENERATED_SRC
564         ${WIRESHARK_QT_SRC}
565         ${WIRESHARK_QT_TAP_SRC}
566         ${WIRESHARK_MODEL_SRCS}
567         ${WIRESHARK_UTILS_SRCS}
568         ${WIRESHARK_MANAGER_SRCS}
569         ${WIRESHARK_WIDGET_SRCS}
570         # WIRESHARK_3RD_PARTY_WIDGET_SRCS is allowed to have warnings
571         #${WIRESHARK_3RD_PARTY_WIDGET_SRCS}
574 set(WIRESHARK_QT_UI
575         about_dialog.ui
576         address_editor_frame.ui
577         bluetooth_att_server_attributes_dialog.ui
578         bluetooth_device_dialog.ui
579         bluetooth_devices_dialog.ui
580         bluetooth_hci_summary_dialog.ui
581         capture_comment_dialog.ui
582         capture_file_properties_dialog.ui
583         capture_info_dialog.ui
584         capture_options_dialog.ui
585         capture_preferences_frame.ui
586         coloring_rules_dialog.ui
587         column_editor_frame.ui
588         column_preferences_frame.ui
589         compiled_filter_output.ui
590         conversation_hash_tables_dialog.ui
591         credentials_dialog.ui
592         decode_as_dialog.ui
593         display_filter_expression_dialog.ui
594         dissector_tables_dialog.ui
595         enabled_protocols_dialog.ui
596         expert_info_dialog.ui
597         export_object_dialog.ui
598         export_pdu_dialog.ui
599         extcap_options_dialog.ui
600         file_set_dialog.ui
601         filter_dialog.ui
602         filter_expression_frame.ui
603         firewall_rules_dialog.ui
604         follow_stream_dialog.ui
605         font_color_preferences_frame.ui
606         funnel_string_dialog.ui
607         funnel_text_dialog.ui
608         gsm_map_summary_dialog.ui
609         iax2_analysis_dialog.ui
610         import_text_dialog.ui
611         interface_frame.ui
612         interface_toolbar.ui
613         io_console_dialog.ui
614         io_graph_dialog.ui
615         layout_preferences_frame.ui
616         lbm_lbtrm_transport_dialog.ui
617         lbm_lbtru_transport_dialog.ui
618         lbm_stream_dialog.ui
619         lte_rlc_graph_dialog.ui
620         main_window_preferences_frame.ui
621         manage_interfaces_dialog.ui
622         manuf_dialog.ui
623         module_preferences_scroll_area.ui
624         mtp3_summary_dialog.ui
625         packet_comment_dialog.ui
626         packet_dialog.ui
627         packet_format_group_box.ui
628         packet_range_group_box.ui
629         preference_editor_frame.ui
630         preferences_dialog.ui
631         print_dialog.ui
632         profile_dialog.ui
633         progress_frame.ui
634         protocol_hierarchy_dialog.ui
635         resolved_addresses_dialog.ui
636         rsa_keys_frame.ui
637         rtp_analysis_dialog.ui
638         rtp_player_dialog.ui
639         rtp_stream_dialog.ui
640         sctp_all_assocs_dialog.ui
641         sctp_assoc_analyse_dialog.ui
642         sctp_chunk_statistics_dialog.ui
643         sctp_graph_arwnd_dialog.ui
644         sctp_graph_byte_dialog.ui
645         sctp_graph_dialog.ui
646         search_frame.ui
647         sequence_dialog.ui
648         show_packet_bytes_dialog.ui
649         tlskeylog_launcher_dialog.ui
650         strip_headers_dialog.ui
651         supported_protocols_dialog.ui
652         tap_parameter_dialog.ui
653         tcp_stream_dialog.ui
654         time_shift_dialog.ui
655         traffic_table_dialog.ui
656         uat_dialog.ui
657         uat_frame.ui
658         voip_calls_dialog.ui
659         welcome_page.ui
660         widgets/splash_overlay.ui
661         wireless_frame.ui
662         wireshark_main_window.ui
665 if(HAVE_PCAP_REMOTE)
666         list(APPEND WIRESHARK_QT_UI
667                 remote_capture_dialog.ui
668                 remote_settings_dialog.ui
669         )
670 endif()
672 set(WIRESHARK_QT_TS
673         wireshark_de.ts
674         wireshark_en.ts # lupdate -pluralonly
675         wireshark_es.ts
676         wireshark_fr.ts
677         wireshark_hu.ts
678         wireshark_it.ts
679         wireshark_ja_JP.ts
680         wireshark_ko.ts
681         wireshark_pl.ts
682         wireshark_ru.ts
683         wireshark_sv.ts
684         wireshark_tr_TR.ts
685         wireshark_uk.ts
686         wireshark_zh_CN.ts
689 foreach(_file ${WIRESHARK_QT_TS})
690         get_filename_component(_qresource ${_file} NAME_WE)
691         set(_qresource_qm "${_qresource}.qm")
692         set(i18n_qresource "${i18n_qresource}\n    <file>${_qresource_qm}</file>")
693 endforeach()
694 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/i18n.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/i18n.qrc)
696 file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/authors.qrc"
697 "<RCC>\n"
698 "    <qresource prefix=\"/about\">\n"
699 "        <file compress-algo=\"zstd\">authors.csv</file>\n"
700 "    </qresource>\n"
701 "</RCC>\n"
704 add_custom_command(
705         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/authors.csv
706         COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/make-authors-csv.py
707                         < ${CMAKE_SOURCE_DIR}/AUTHORS
708                         > ${CMAKE_CURRENT_BINARY_DIR}/authors.csv
709         DEPENDS
710                 ${CMAKE_SOURCE_DIR}/tools/make-authors-csv.py
711                 ${CMAKE_SOURCE_DIR}/AUTHORS
714 # Drop the file modification time of source files from generated files
715 # to help with reproducible builds. We do not use QFileInfo.lastModified
716 # so this has no unwanted side effects. This mtime started appearing in
717 # Qt 5.8. The option to force the old file format without mtime was
718 # added in Qt 5.9. See https://bugreports.qt.io/browse/QTBUG-58769.
719 # Force the compression algorithm to zlib, since zstd requires format
720 # version 3. See https://gitlab.com/wireshark/wireshark/-/issues/18100.
721 # Use the number of dashes for each argument as documented at
722 # https://doc.qt.io/qt-6/rcc.html.
723 set(CMAKE_AUTORCC_OPTIONS --format-version 1)
724 list(APPEND CMAKE_AUTORCC_OPTIONS -compress-algo zlib)
726 qt_add_resources(WIRESHARK_QT_QRC
727         ../../resources/about.qrc
728         ../../resources/languages/languages.qrc
729         ../../resources/layout.qrc
730         ../../resources/stock_icons.qrc
731         ../../resources/wsicon.qrc
732         ${CMAKE_CURRENT_BINARY_DIR}/i18n.qrc
733         ${CMAKE_CURRENT_BINARY_DIR}/authors.qrc
734         OPTIONS ${CMAKE_AUTORCC_OPTIONS}
737 if (USE_qt6)
738         QT6_ADD_TRANSLATION(WIRESHARK_QT_QM ${WIRESHARK_QT_TS} OPTIONS -silent)
739 else()
740         QT5_ADD_TRANSLATION(WIRESHARK_QT_QM ${WIRESHARK_QT_TS} OPTIONS -silent)
741 endif()
743 if (WIN32)
744         add_custom_target(copy_qt_translations ALL)
745         add_custom_command(TARGET copy_qt_translations
746                 POST_BUILD
747                 COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:wireshark>/translations
748                 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${WIRESHARK_QT_QM} $<TARGET_FILE_DIR:wireshark>/translations
749         )
750 endif()
752 add_custom_target(
753         translations
754         DEPENDS
755                 ${WIRESHARK_QT_QM}
757 set_target_properties(translations PROPERTIES FOLDER "UI")
759 set_source_files_properties(
760         ${WIRESHARK_QT_NONGENERATED_SRC}
761         PROPERTIES
762         COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
765 set_source_files_properties(
766         wireshark-tap-register.c
767         PROPERTIES
768         SKIP_AUTOGEN ON
771 add_definitions(${QT5_DEFINITIONS})
773 register_tap_files(wireshark-tap-register.c
774         ${WIRESHARK_QT_TAP_SRC}
777 source_group("ui\\UIC Files" FILES ${WIRESHARK_QT_UI})
778 source_group("ui\\qrc" FILES ${WIRESHARK_QT_QRC})
779 source_group("ui\\Header" FILES ${WIRESHARK_QT_HEADERS})
780 source_group("ui\\Widget Header" FILES ${WIRESHARK_WIDGET_HEADERS})
781 source_group("ui\\Widget Source" FILES ${WIRESHARK_WIDGET_SRCS})
782 source_group("ui\\Utils Headers Files" FILES ${WIRESHARK_UTILS_HEADERS})
783 source_group("ui\\Utils Source" FILES ${WIRESHARK_UTILS_SRCS})
784 source_group("ui\\Models Headers" FILES ${WIRESHARK_MODEL_HEADERS})
785 source_group("ui\\Models Source" FILES ${WIRESHARK_MODEL_SRCS})
786 source_group("ui\\Manager Headers" FILES ${WIRESHARK_MANAGER_HEADERS})
787 source_group("ui\\Manager Source" FILES ${WIRESHARK_MANAGER_SRCS})
789 add_library(qtui OBJECT
790         #Included so that Visual Studio can properly put header files in solution
791         ${WIRESHARK_QT_HEADERS}
792         ${WIRESHARK_WIDGET_HEADERS}
793         ${WIRESHARK_3RD_PARTY_WIDGET_HEADERS}
794         ${WIRESHARK_MANAGER_HEADERS}
795         ${WIRESHARK_UTILS_HEADERS}
796         ${WIRESHARK_MODEL_HEADERS}
798         ${WIRESHARK_QT_NONGENERATED_SRC}
799         ${WIRESHARK_3RD_PARTY_WIDGET_SRCS}
801         # For AUTOUIC and AUTORCC.
802         ${WIRESHARK_QT_UI}
803         ${WIRESHARK_QT_QRC}
805         ${WIRESHARK_QT_TAP_SRC}
806         wireshark-tap-register.c
809 if(USE_qt6)
810         target_link_libraries(qtui PUBLIC
811                 Qt6::Widgets
812                 Qt6::Core5Compat
813                 Qt6::Concurrent
814                 Qt6::PrintSupport
815         )
816         if(Qt6Multimedia_FOUND)
817                 target_link_libraries(qtui PUBLIC Qt6::Multimedia)
818         endif()
819         if(Qt6DBus_FOUND)
820                 target_link_libraries(qtui PUBLIC Qt6::DBus)
821         endif()
822 endif()
824 target_include_directories(qtui
825         SYSTEM PRIVATE
826                 # Include Qt before anything else, see the comment about
827                 # QT5_INCLUDE_DIRS in the top-level CMakeLists.txt
828                 # Basically, qt@5 headers should be prioritized over qt@6 which
829                 # would be found due to GCRYPT_INCLUDE_DIRS=/usr/local/include
830                 ${QT5_INCLUDE_DIRS}
831                 ${GCRYPT_INCLUDE_DIRS}
832                 ${MINIZIP_INCLUDE_DIRS}
833                 ${MINIZIPNG_INCLUDE_DIRS}
834                 ${PCAP_INCLUDE_DIRS}
835                 ${SPEEXDSP_INCLUDE_DIRS}
836                 ${WINSPARKLE_INCLUDE_DIRS}
837         PRIVATE
838                 ${CMAKE_CURRENT_BINARY_DIR}
839                 ${CMAKE_CURRENT_SOURCE_DIR}
842 target_compile_definitions(qtui
843         PUBLIC
844                 ${QT5_COMPILE_DEFINITIONS}
847 set_target_properties(qtui PROPERTIES
848         LINK_FLAGS "${WS_LINK_FLAGS}"
849         FOLDER "UI"
850         AUTOMOC ON
851         AUTOUIC ON
852         # AUTORCC not needed with qt_add_resources
853         #AUTORCC ON
854         # Ensure .qm files are generated before autogenerating i18n.qrc
855         AUTOGEN_TARGET_DEPENDS "${WIRESHARK_QT_QM}"
858 if(MSVC)
859         set_target_properties(qtui PROPERTIES LINK_FLAGS_DEBUG "${WS_MSVC_DEBUG_LINK_FLAGS}")
860         # https://bugreports.qt.io/browse/QTBUG-118993
861         if(Qt${qtver}Widgets_VERSION VERSION_LESS "6.5.4")
862                 target_compile_definitions(qtui PUBLIC _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING)
863         endif()
864 endif()
866 CHECKAPI(
867         NAME
868                 ui-qt
869         SWITCHES
870                 --nocheck-shadow
871         SOURCES
872                 # QCustomPlot (WIRESHARK_3RD_PARTY_WIDGET_{HEADERS,SRCS}) uses
873                 # prohibited APIs.
874                 ${WIRESHARK_QT_HEADERS}
875                 ${WIRESHARK_WIDGET_HEADERS}
876                 ${WIRESHARK_MANAGER_HEADERS}
877                 ${WIRESHARK_UTILS_HEADERS}
878                 ${WIRESHARK_MODEL_HEADERS}
880                 ${WIRESHARK_QT_SRC}
881                 ${WIRESHARK_WIDGET_SRCS}
882                 ${WIRESHARK_MANAGER_SRCS}
883                 ${WIRESHARK_UTILS_SRCS}
884                 ${WIRESHARK_MODEL_SRCS}
885                 ${WIRESHARK_QT_TAP_SRC}
889 # Editor modelines  -  https://www.wireshark.org/tools/modelines.html
891 # Local variables:
892 # c-basic-offset: 8
893 # tab-width: 8
894 # indent-tabs-mode: t
895 # End:
897 # vi: set shiftwidth=8 tabstop=8 noexpandtab:
898 # :indentSize=8:tabSize=8:noTabs=false: