HTTPS (almost) everywhere.
[metze/wireshark/wip.git] / ui / qt / CMakeLists.txt
1 # CMakeLists.txt
2 #
3 # Wireshark - Network traffic analyzer
4 # By Gerald Combs <gerald@wireshark.org>
5 # Copyright 1998 Gerald Combs
6 #
7 # SPDX-License-Identifier: GPL-2.0-or-later
8 #
9
10 ADD_CUSTOM_CMAKE_INCLUDE()
11
12 set(WIRESHARK_WIDGET_HEADERS
13         widgets/additional_toolbar.h
14         widgets/apply_line_edit.h
15         widgets/byte_view_text.h
16         widgets/capture_filter_combo.h
17         widgets/capture_filter_edit.h
18         widgets/clickable_label.h
19         widgets/copy_from_profile_menu.h
20         widgets/display_filter_combo.h
21         widgets/display_filter_edit.h
22         widgets/dissector_tables_view.h
23         widgets/drag_drop_toolbar.h
24         widgets/drag_label.h
25         widgets/editor_file_dialog.h
26         widgets/expert_info_view.h
27         widgets/export_objects_view.h
28         widgets/elided_label.h
29         widgets/field_filter_edit.h
30         widgets/filter_expression_toolbar.h
31         widgets/find_line_edit.h
32         widgets/follow_stream_text.h
33         widgets/interface_toolbar_lineedit.h
34         widgets/label_stack.h
35         widgets/overlay_scroll_bar.h
36         widgets/pref_module_view.h
37         widgets/packet_list_header.h
38         widgets/profile_tree_view.h
39         widgets/qcustomplot.h
40         widgets/range_syntax_lineedit.h
41         widgets/splash_overlay.h
42         widgets/stock_icon_tool_button.h
43         widgets/syntax_line_edit.h
44         widgets/tabnav_tree_view.h
45         widgets/wireshark_file_dialog.h
46         widgets/wireless_timeline.h
47 )
48
49 set(WIRESHARK_MANAGER_HEADERS
50         manager/preference_manager.h
51         manager/wireshark_preference.h
52 )
53
54 set(WIRESHARK_UTILS_HEADERS
55         utils/color_utils.h
56         utils/data_printer.h
57         utils/field_information.h
58         utils/frame_information.h
59         utils/idata_printable.h
60         utils/proto_node.h
61         utils/qt_ui_utils.h
62         utils/stock_icon.h
63         utils/tango_colors.h
64         utils/variant_pointer.h
65         utils/wireshark_mime_data.h
66         utils/wireshark_zip_helper.h
67 )
68
69 set(WIRESHARK_MODEL_HEADERS
70         models/astringlist_list_model.h
71         models/cache_proxy_model.h
72         models/coloring_rules_delegate.h
73         models/coloring_rules_model.h
74         models/decode_as_delegate.h
75         models/decode_as_model.h
76         models/dissector_tables_model.h
77         models/enabled_protocols_model.h
78         models/expert_info_model.h
79         models/expert_info_proxy_model.h
80         models/export_objects_model.h
81         models/fileset_entry_model.h
82         models/info_proxy_model.h
83         models/interface_sort_filter_model.h
84         models/interface_tree_cache_model.h
85         models/interface_tree_model.h
86         models/numeric_value_chooser_delegate.h
87         models/packet_list_model.h
88         models/packet_list_record.h
89         models/path_chooser_delegate.h
90         models/credentials_model.h
91         models/percent_bar_delegate.h
92         models/pref_delegate.h
93         models/pref_models.h
94         models/profile_model.h
95         models/proto_tree_model.h
96         models/related_packet_delegate.h
97         models/sparkline_delegate.h
98         models/supported_protocols_model.h
99         models/timeline_delegate.h
100         models/tree_model_helpers.h
101         models/uat_delegate.h
102         models/uat_model.h
103         models/url_link_delegate.h
104         models/voip_calls_info_model.h
105 )
106
107 # All .h files which inherit from QObject aka which use the Q_OBJECT macro
108 # need to go here.
109 set(WIRESHARK_QT_HEADERS
110         about_dialog.h
111         accordion_frame.h
112         address_editor_frame.h
113         bluetooth_att_server_attributes_dialog.h
114         bluetooth_device_dialog.h
115         bluetooth_devices_dialog.h
116         bluetooth_hci_summary_dialog.h
117         accordion_frame.h
118         byte_view_tab.h
119         capture_file.h
120         capture_file_dialog.h
121         capture_file_properties_dialog.h
122         capture_filter_syntax_worker.h
123         capture_info_dialog.h
124         capture_interfaces_dialog.h
125         capture_preferences_frame.h
126         coloring_rules_dialog.h
127         column_preferences_frame.h
128         column_editor_frame.h
129         compiled_filter_output.h
130         conversation_colorize_action.h
131         conversation_dialog.h
132         conversation_hash_tables_dialog.h
133         decode_as_dialog.h
134         display_filter_expression_dialog.h
135         dissector_tables_dialog.h
136         enabled_protocols_dialog.h
137         endpoint_dialog.h
138         expert_info_dialog.h
139         export_dissection_dialog.h
140         export_object_action.h
141         export_object_dialog.h
142         export_pdu_dialog.h
143         extcap_argument.h
144         extcap_argument_file.h
145         extcap_argument_multiselect.h
146         extcap_options_dialog.h
147         file_set_dialog.h
148         filter_action.h
149         filter_dialog.h
150         filter_dialog.h
151         filter_expression_frame.h
152         firewall_rules_dialog.h
153         follow_stream_dialog.h
154         font_color_preferences_frame.h
155         funnel_string_dialog.h
156         funnel_text_dialog.h
157         funnel_statistics.h
158         geometry_state_dialog.h
159         gsm_map_summary_dialog.h
160         iax2_analysis_dialog.h
161         import_text_dialog.h
162         interface_toolbar.h
163         interface_toolbar_reader.h
164         interface_frame.h
165         io_graph_dialog.h
166         layout_preferences_frame.h
167         lbm_lbtrm_transport_dialog.h
168         lbm_lbtru_transport_dialog.h
169         lbm_stream_dialog.h
170         lte_rlc_graph_dialog.h
171         lte_mac_statistics_dialog.h
172         lte_rlc_statistics_dialog.h
173         main_status_bar.h
174         welcome_page.h
175         main_window.h
176         main_window_preferences_frame.h
177         manage_interfaces_dialog.h
178         module_preferences_scroll_area.h
179         mtp3_summary_dialog.h
180         multicast_statistics_dialog.h
181         packet_comment_dialog.h
182         packet_dialog.h
183         packet_format_group_box.h
184         packet_list.h
185         packet_range_group_box.h
186         credentials_dialog.h
187         preference_editor_frame.h
188         preferences_dialog.h
189         print_dialog.h
190         profile_dialog.h
191         progress_frame.h
192         proto_tree.h
193         protocol_hierarchy_dialog.h
194         protocol_preferences_menu.h
195         recent_file_status.h
196         resolved_addresses_dialog.h
197         response_time_delay_dialog.h
198         rpc_service_response_time_dialog.h
199         rsa_keys_frame.h
200         rtp_analysis_dialog.h
201         rtp_audio_stream.h
202         rtp_player_dialog.h
203         rtp_stream_dialog.h
204         scsi_service_response_time_dialog.h
205         sctp_all_assocs_dialog.h
206         sctp_assoc_analyse_dialog.h
207         sctp_chunk_statistics_dialog.h
208         sctp_graph_dialog.h
209         sctp_graph_arwnd_dialog.h
210         sctp_graph_byte_dialog.h
211         search_frame.h
212         sequence_diagram.h
213         sequence_dialog.h
214         show_packet_bytes_dialog.h
215         stats_tree_dialog.h
216         service_response_time_dialog.h
217         simple_statistics_dialog.h
218         supported_protocols_dialog.h
219         tabnav_tree_widget.h
220         tap_parameter_dialog.h
221         tcp_stream_dialog.h
222         time_shift_dialog.h
223         traffic_table_dialog.h
224         uat_dialog.h
225         uat_frame.h
226         voip_calls_dialog.h
227         wireless_frame.h
228         wireshark_application.h
229         wireshark_dialog.h
230         wlan_statistics_dialog.h
231         ${WIRESHARK_CUSTOM_QT_HEADERS}
232 )
233
234 if(HAVE_PCAP_REMOTE)
235         list(APPEND WIRESHARK_QT_HEADERS
236                 remote_capture_dialog.h
237                 remote_settings_dialog.h
238         )
239 endif()
240
241 set(WIRESHARK_WIDGET_SRCS
242         widgets/additional_toolbar.cpp
243         widgets/apply_line_edit.cpp
244         widgets/byte_view_text.cpp
245         widgets/capture_filter_combo.cpp
246         widgets/capture_filter_edit.cpp
247         widgets/clickable_label.cpp
248         widgets/copy_from_profile_menu.cpp
249         widgets/display_filter_combo.cpp
250         widgets/display_filter_edit.cpp
251         widgets/dissector_tables_view.cpp
252         widgets/drag_drop_toolbar.cpp
253         widgets/drag_label.cpp
254         widgets/editor_file_dialog.cpp
255         widgets/elided_label.cpp
256         widgets/expert_info_view.cpp
257         widgets/export_objects_view.cpp
258         widgets/field_filter_edit.cpp
259         widgets/filter_expression_toolbar.cpp
260         widgets/find_line_edit.cpp
261         widgets/follow_stream_text.cpp
262         widgets/interface_toolbar_lineedit.cpp
263         widgets/label_stack.cpp
264         widgets/overlay_scroll_bar.cpp
265         widgets/packet_list_header.cpp
266         widgets/pref_module_view.cpp
267         widgets/profile_tree_view.cpp
268         widgets/qcustomplot.cpp
269         widgets/range_syntax_lineedit.cpp
270         widgets/splash_overlay.cpp
271         widgets/stock_icon_tool_button.cpp
272         widgets/syntax_line_edit.cpp
273         widgets/tabnav_tree_view.cpp
274         widgets/wireless_timeline.cpp
275         widgets/wireshark_file_dialog.cpp
276 )
277
278 set(WIRESHARK_MANAGER_SRCS
279         manager/preference_manager.cpp
280         manager/wireshark_preference.cpp
281 )
282
283 set(WIRESHARK_UTILS_SRCS
284         utils/color_utils.cpp
285         utils/data_printer.cpp
286         utils/field_information.cpp
287         utils/frame_information.cpp
288         utils/proto_node.cpp
289         utils/qt_ui_utils.cpp
290         utils/stock_icon.cpp
291         utils/wireshark_mime_data.cpp
292         utils/wireshark_zip_helper.cpp
293 )
294
295 set(WIRESHARK_MODEL_SRCS
296         models/astringlist_list_model.cpp
297         models/cache_proxy_model.cpp
298         models/coloring_rules_delegate.cpp
299         models/coloring_rules_model.cpp
300         models/decode_as_delegate.cpp
301         models/decode_as_model.cpp
302         models/dissector_tables_model.cpp
303         models/enabled_protocols_model.cpp
304         models/expert_info_model.cpp
305         models/expert_info_proxy_model.cpp
306         models/export_objects_model.cpp
307         models/fileset_entry_model.cpp
308         models/info_proxy_model.cpp
309         models/interface_sort_filter_model.cpp
310         models/interface_tree_cache_model.cpp
311         models/interface_tree_model.cpp
312         models/numeric_value_chooser_delegate.cpp
313         models/packet_list_model.cpp
314         models/packet_list_record.cpp
315         models/credentials_model.cpp
316         models/path_chooser_delegate.cpp
317         models/percent_bar_delegate.cpp
318         models/pref_delegate.cpp
319         models/pref_models.cpp
320         models/profile_model.cpp
321         models/proto_tree_model.cpp
322         models/related_packet_delegate.cpp
323         models/sparkline_delegate.cpp
324         models/supported_protocols_model.cpp
325         models/timeline_delegate.cpp
326         models/uat_delegate.cpp
327         models/uat_model.cpp
328         models/url_link_delegate.cpp
329         models/voip_calls_info_model.cpp
330 )
331
332 set(WIRESHARK_QT_SRC
333         about_dialog.cpp
334         accordion_frame.cpp
335         address_editor_frame.cpp
336         bluetooth_att_server_attributes_dialog.cpp
337         bluetooth_device_dialog.cpp
338         bluetooth_devices_dialog.cpp
339         bluetooth_hci_summary_dialog.cpp
340         byte_view_tab.cpp
341         capture_file.cpp
342         capture_file_dialog.cpp
343         capture_file_properties_dialog.cpp
344         capture_filter_syntax_worker.cpp
345         capture_info_dialog.cpp
346         capture_interfaces_dialog.cpp
347         capture_preferences_frame.cpp
348         coloring_rules_dialog.cpp
349         column_preferences_frame.cpp
350         column_editor_frame.cpp
351         compiled_filter_output.cpp
352         conversation_colorize_action.cpp
353         conversation_dialog.cpp
354         conversation_hash_tables_dialog.cpp
355         decode_as_dialog.cpp
356         display_filter_expression_dialog.cpp
357         dissector_tables_dialog.cpp
358         enabled_protocols_dialog.cpp
359         endpoint_dialog.cpp
360         export_dissection_dialog.cpp
361         export_object_action.cpp
362         export_object_dialog.cpp
363         export_pdu_dialog.cpp
364         extcap_argument.cpp
365         extcap_argument_file.cpp
366         extcap_argument_multiselect.cpp
367         extcap_options_dialog.cpp
368         file_set_dialog.cpp
369         filter_action.cpp
370         filter_dialog.cpp
371         filter_expression_frame.cpp
372         firewall_rules_dialog.cpp
373         follow_stream_dialog.cpp
374         font_color_preferences_frame.cpp
375         funnel_string_dialog.cpp
376         funnel_text_dialog.cpp
377         geometry_state_dialog.cpp
378         iax2_analysis_dialog.cpp
379         import_text_dialog.cpp
380         interface_frame.cpp
381         interface_toolbar.cpp
382         interface_toolbar_reader.cpp
383         layout_preferences_frame.cpp
384         lbm_lbtrm_transport_dialog.cpp
385         lbm_lbtru_transport_dialog.cpp
386         lbm_stream_dialog.cpp
387         lte_mac_statistics_dialog.cpp
388         lte_rlc_graph_dialog.cpp
389         lte_rlc_statistics_dialog.cpp
390         main_status_bar.cpp
391         welcome_page.cpp
392         main.cpp
393         main_window.cpp
394         main_window_preferences_frame.cpp
395         main_window_layout.cpp
396         main_window_slots.cpp
397         manage_interfaces_dialog.cpp
398         module_preferences_scroll_area.cpp
399         packet_comment_dialog.cpp
400         packet_dialog.cpp
401         packet_format_group_box.cpp
402         packet_list.cpp
403         packet_range_group_box.cpp
404         credentials_dialog.cpp
405         preference_editor_frame.cpp
406         preferences_dialog.cpp
407         print_dialog.cpp
408         profile_dialog.cpp
409         progress_frame.cpp
410         proto_tree.cpp
411         protocol_hierarchy_dialog.cpp
412         protocol_preferences_menu.cpp
413         recent_file_status.cpp
414         resolved_addresses_dialog.cpp
415         response_time_delay_dialog.cpp
416         rpc_service_response_time_dialog.cpp
417         rsa_keys_frame.cpp
418         rtp_analysis_dialog.cpp
419         rtp_audio_stream.cpp
420         rtp_player_dialog.cpp
421         rtp_stream_dialog.cpp
422         scsi_service_response_time_dialog.cpp
423         sctp_all_assocs_dialog.cpp
424         sctp_assoc_analyse_dialog.cpp
425         sctp_chunk_statistics_dialog.cpp
426         sctp_graph_dialog.cpp
427         sctp_graph_arwnd_dialog.cpp
428         sctp_graph_byte_dialog.cpp
429         search_frame.cpp
430         sequence_diagram.cpp
431         sequence_dialog.cpp
432         service_response_time_dialog.cpp
433         show_packet_bytes_dialog.cpp
434         simple_dialog.cpp
435         simple_statistics_dialog.cpp
436         supported_protocols_dialog.cpp
437         tabnav_tree_widget.cpp
438         tap_parameter_dialog.cpp
439         tcp_stream_dialog.cpp
440         time_shift_dialog.cpp
441         traffic_table_dialog.cpp
442         uat_dialog.cpp
443         uat_frame.cpp
444         voip_calls_dialog.cpp
445         wireless_frame.cpp
446         wireshark_application.cpp
447         wireshark_dialog.cpp
448         ${WIRESHARK_CUSTOM_QT_SRCS}
449 )
450
451 if(HAVE_PCAP_REMOTE)
452         list(APPEND WIRESHARK_QT_SRC
453                 remote_capture_dialog.cpp
454                 remote_settings_dialog.cpp
455         )
456 endif()
457
458 set(WIRESHARK_QT_TAP_SRC
459         ${CMAKE_CURRENT_SOURCE_DIR}/expert_info_dialog.cpp
460         ${CMAKE_CURRENT_SOURCE_DIR}/funnel_statistics.cpp
461         ${CMAKE_CURRENT_SOURCE_DIR}/gsm_map_summary_dialog.cpp
462         ${CMAKE_CURRENT_SOURCE_DIR}/io_graph_dialog.cpp
463         ${CMAKE_CURRENT_SOURCE_DIR}/lte_mac_statistics_dialog.cpp
464         ${CMAKE_CURRENT_SOURCE_DIR}/lte_rlc_statistics_dialog.cpp
465         ${CMAKE_CURRENT_SOURCE_DIR}/mtp3_summary_dialog.cpp
466         ${CMAKE_CURRENT_SOURCE_DIR}/multicast_statistics_dialog.cpp
467         ${CMAKE_CURRENT_SOURCE_DIR}/rtp_stream_dialog.cpp
468         ${CMAKE_CURRENT_SOURCE_DIR}/sctp_all_assocs_dialog.cpp
469         ${CMAKE_CURRENT_SOURCE_DIR}/sctp_assoc_analyse_dialog.cpp
470         ${CMAKE_CURRENT_SOURCE_DIR}/stats_tree_dialog.cpp
471         ${CMAKE_CURRENT_SOURCE_DIR}/wlan_statistics_dialog.cpp
472         ${WIRESHARK_CUSTOM_TAP_SRC}
473 )
474
475 set(WIRESHARK_QT_FILES
476         ${WIRESHARK_QT_SRC}
477         ${WIRESHARK_QT_TAP_SRC}
478 )
479
480 set(WIRESHARK_QT_UI
481         about_dialog.ui
482         address_editor_frame.ui
483         bluetooth_att_server_attributes_dialog.ui
484         bluetooth_device_dialog.ui
485         bluetooth_devices_dialog.ui
486         bluetooth_hci_summary_dialog.ui
487         capture_file_properties_dialog.ui
488         capture_info_dialog.ui
489         capture_interfaces_dialog.ui
490         capture_preferences_frame.ui
491         coloring_rules_dialog.ui
492         column_preferences_frame.ui
493         column_editor_frame.ui
494         compiled_filter_output.ui
495         conversation_hash_tables_dialog.ui
496         decode_as_dialog.ui
497         display_filter_expression_dialog.ui
498         dissector_tables_dialog.ui
499         enabled_protocols_dialog.ui
500         expert_info_dialog.ui
501         export_object_dialog.ui
502         export_pdu_dialog.ui
503         extcap_options_dialog.ui
504         file_set_dialog.ui
505         filter_dialog.ui
506         filter_expression_frame.ui
507         firewall_rules_dialog.ui
508         follow_stream_dialog.ui
509         font_color_preferences_frame.ui
510         funnel_string_dialog.ui
511         funnel_text_dialog.ui
512         gsm_map_summary_dialog.ui
513         iax2_analysis_dialog.ui
514         import_text_dialog.ui
515         interface_frame.ui
516         interface_toolbar.ui
517         io_graph_dialog.ui
518         layout_preferences_frame.ui
519         lbm_lbtrm_transport_dialog.ui
520         lbm_lbtru_transport_dialog.ui
521         lbm_stream_dialog.ui
522         lte_rlc_graph_dialog.ui
523         welcome_page.ui
524         main_window.ui
525         main_window_preferences_frame.ui
526         manage_interfaces_dialog.ui
527         module_preferences_scroll_area.ui
528         mtp3_summary_dialog.ui
529         packet_comment_dialog.ui
530         packet_dialog.ui
531         packet_format_group_box.ui
532         packet_range_group_box.ui
533         credentials_dialog.ui
534         preference_editor_frame.ui
535         preferences_dialog.ui
536         print_dialog.ui
537         profile_dialog.ui
538         progress_frame.ui
539         protocol_hierarchy_dialog.ui
540         resolved_addresses_dialog.ui
541         rsa_keys_frame.ui
542         rtp_analysis_dialog.ui
543         rtp_player_dialog.ui
544         rtp_stream_dialog.ui
545         sctp_all_assocs_dialog.ui
546         sctp_assoc_analyse_dialog.ui
547         sctp_chunk_statistics_dialog.ui
548         sctp_graph_dialog.ui
549         sctp_graph_arwnd_dialog.ui
550         sctp_graph_byte_dialog.ui
551         search_frame.ui
552         sequence_dialog.ui
553         show_packet_bytes_dialog.ui
554         widgets/splash_overlay.ui
555         supported_protocols_dialog.ui
556         tap_parameter_dialog.ui
557         tcp_stream_dialog.ui
558         time_shift_dialog.ui
559         traffic_table_dialog.ui
560         uat_dialog.ui
561         uat_frame.ui
562         voip_calls_dialog.ui
563         wireless_frame.ui
564 )
565
566 if(HAVE_PCAP_REMOTE)
567         list(APPEND WIRESHARK_QT_UI
568                 remote_capture_dialog.ui
569                 remote_settings_dialog.ui
570         )
571 endif()
572
573 set(WIRESHARK_QT_TS
574         wireshark_de.ts
575         wireshark_en.ts # lupdate -pluralonly
576         wireshark_fr.ts
577         wireshark_it.ts
578         wireshark_ja_JP.ts
579         wireshark_pl.ts
580         wireshark_ru.ts
581         wireshark_sv.ts
582         wireshark_uk.ts
583         wireshark_zh_CN.ts
584 )
585
586 foreach(_file ${WIRESHARK_QT_TS})
587         get_filename_component(_qresource ${_file} NAME_WE)
588         set(_qresource_qm "${_qresource}.qm")
589         set(i18n_qresource "${i18n_qresource}\n    <file>${_qresource_qm}</file>")
590 endforeach()
591 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/i18n.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/i18n.qrc)
592
593 set(WIRESHARK_QT_QRC
594         ../../image/about.qrc
595         ../../image/languages/languages.qrc
596         ../../image/layout.qrc
597         ../../image/stock_icons.qrc
598         ../../image/wsicon.qrc
599         ${CMAKE_CURRENT_BINARY_DIR}/i18n.qrc
600 )
601
602 include_directories(
603         ${CMAKE_CURRENT_BINARY_DIR}
604         ${CMAKE_CURRENT_SOURCE_DIR}
605 )
606
607 set(CMAKE_AUTOMOC TRUE)
608 set(CMAKE_AUTOUIC TRUE)
609 set(CMAKE_AUTORCC TRUE)
610
611 if(NOT Qt5Widgets_VERSION VERSION_LESS "5.9")
612         # Drop the file modification time of source files from generated files
613         # to help with reproducible builds. We do not use QFileInfo.lastModified
614         # so this has no unwanted side effects. This mtime started appearing in
615         # Qt 5.8. The option to force the old file format without mtime was
616         # added in Qt 5.9. See https://bugreports.qt.io/browse/QTBUG-58769
617         set(CMAKE_AUTORCC_OPTIONS --format-version 1)
618 endif()
619
620 QT5_ADD_TRANSLATION(WIRESHARK_QT_QM ${WIRESHARK_QT_TS})
621
622 add_custom_target(
623         translations
624         DEPENDS
625                 ${WIRESHARK_QT_QM}
626 )
627 set_target_properties(translations PROPERTIES FOLDER "UI")
628
629 set_source_files_properties(
630         ${WIRESHARK_QT_FILES}
631         PROPERTIES
632         COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
633 )
634
635 add_definitions(${QT_DEFINITIONS})
636
637 register_tap_files(wireshark-tap-register.c
638         ${WIRESHARK_QT_TAP_SRC}
639 )
640
641 source_group("ui\\UIC Files" FILES ${WIRESHARK_QT_UI})
642 source_group("ui\\qrc" FILES ${WIRESHARK_QT_QRC})
643 source_group("ui\\Header" FILES ${WIRESHARK_QT_HEADERS})
644 source_group("ui\\Widget Header" FILES ${WIRESHARK_WIDGET_HEADERS})
645 source_group("ui\\Widget Source" FILES ${WIRESHARK_WIDGET_SRCS})
646 source_group("ui\\Utils Headers Files" FILES ${WIRESHARK_UTILS_HEADERS})
647 source_group("ui\\Utils Source" FILES ${WIRESHARK_UTILS_SRCS})
648 source_group("ui\\Models Headers" FILES ${WIRESHARK_MODEL_HEADERS})
649 source_group("ui\\Models Source" FILES ${WIRESHARK_MODEL_SRCS})
650 source_group("ui\\Manager Headers" FILES ${WIRESHARK_MANAGER_HEADERS})
651 source_group("ui\\Manager Source" FILES ${WIRESHARK_MANAGER_SRCS})
652
653 add_library(qtui OBJECT
654         #Included so that Visual Studio can properly put header files in solution
655         ${WIRESHARK_QT_HEADERS}
656         ${WIRESHARK_WIDGET_HEADERS}
657         ${WIRESHARK_MANAGER_HEADERS}
658         ${WIRESHARK_UTILS_HEADERS}
659         ${WIRESHARK_MODEL_HEADERS}
660
661         ${WIRESHARK_QT_SRC}
662         ${WIRESHARK_WIDGET_SRCS}
663         ${WIRESHARK_MANAGER_SRCS}
664         ${WIRESHARK_UTILS_SRCS}
665         ${WIRESHARK_MODEL_SRCS}
666
667         # For AUTOUIC and AUTORCC.
668         ${WIRESHARK_QT_UI}
669         ${WIRESHARK_QT_QRC}
670
671         ${WIRESHARK_QT_TAP_SRC}
672         wireshark-tap-register.c
673 )
674
675 target_include_directories(qtui SYSTEM
676         PUBLIC
677                 ${QT_INCLUDE_DIRS}
678                 ${WINSPARKLE_INCLUDE_DIRS}
679                 ${SPEEXDSP_INCLUDE_DIRS}
680         PRIVATE
681                 # Can't use imported target, linking object libraries for usage requirements
682                 # requires CMake 3.12
683                 ${PCAP_INCLUDE_DIRS}
684 )
685
686 target_compile_definitions(qtui
687         PUBLIC
688                 ${QT_COMPILE_DEFINITIONS}
689 )
690
691 set_target_properties(qtui PROPERTIES
692         LINK_FLAGS "${WS_LINK_FLAGS}"
693         FOLDER "UI"
694         # Ensure .qm files are generated before autogenerating i18n.qrc
695         AUTOGEN_TARGET_DEPENDS "${WIRESHARK_QT_QM}"
696 )
697
698 #
699 # Editor modelines  -  https://www.wireshark.org/tools/modelines.html
700 #
701 # Local variables:
702 # c-basic-offset: 8
703 # tab-width: 8
704 # indent-tabs-mode: t
705 # End:
706 #
707 # vi: set shiftwidth=8 tabstop=8 noexpandtab:
708 # :indentSize=8:tabSize=8:noTabs=false:
709 #