Ticket #61085: CMakeLists.txt

File CMakeLists.txt, 18.4 KB (added by rhsingertwg, 4 years ago)

file mentioned in first error

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