CMake: More Qt4 removal.
authorGerald Combs <gerald@wireshark.org>
Sat, 7 Apr 2018 10:58:17 +0000 (18:58 +0800)
committerGerald Combs <gerald@wireshark.org>
Mon, 9 Apr 2018 01:35:28 +0000 (01:35 +0000)
Remove some Qt major version checks. Remove the ENABLE_QT5 option.

Change-Id: I891bc90956a2ea2cd5a7c50c56d9fcbfc963d6c2
Reviewed-on: https://code.wireshark.org/review/26785
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
CMakeLists.txt
CMakeOptions.txt
debian/rules

index da13fd9e2d779de64d8484bc5dcd1cbbbf39bc72..743ec612fe3806043b3b1b98003f130bf8c7fef4 100644 (file)
@@ -904,40 +904,33 @@ endif()
 
 # Build the Qt GUI?
 if(BUILD_wireshark)
-       if(ENABLE_QT5)
-               # Untested, may not work if CMAKE_PREFIX_PATH gets overwritten
-               # somewhere. The if WIN32 in this place is annoying as well.
-               if( WIN32 )
-                       set( QT5_BASE_PATH "$ENV{QT5_BASE_DIR}" )
-                       set( CMAKE_PREFIX_PATH "${QT5_BASE_PATH}" )
-               endif()
-               set(PACKAGELIST ${PACKAGELIST}
-                       Qt5Core
-                       Qt5LinguistTools
-                       Qt5Multimedia
-                       Qt5PrintSupport
-                       Qt5Svg
-                       Qt5Widgets
-               )
-               set(Qt5Core_OPTIONS REQUIRED)
-               set(Qt5LinguistTools_OPTIONS REQUIRED)
-               set(Qt5Multimedia_OPTIONS REQUIRED)
-               set(Qt5PrintSupport_OPTIONS REQUIRED)
-               set(Qt5Svg_OPTIONS REQUIRED)
-               set(Qt5Widgets_OPTIONS REQUIRED)
-               if (APPLE)
-                       set(PACKAGELIST ${PACKAGELIST} Qt5MacExtras)
-                       set(Qt5MacExtras_OPTIONS REQUIRED)
-               endif()
-               if( WIN32 )
-                       set(PACKAGELIST ${PACKAGELIST} Qt5WinExtras)
-                       set(Qt5WinExtras_OPTIONS REQUIRED)
-               endif()
-               set(QT_VERSION 5)
-       else()
-               set(PACKAGELIST ${PACKAGELIST} Qt4)
-               set(Qt4_OPTIONS 4.8 REQUIRED QtCore QtGui)
-               set(QT_VERSION 4)
+       # Untested, may not work if CMAKE_PREFIX_PATH gets overwritten
+       # somewhere. The if WIN32 in this place is annoying as well.
+       if( WIN32 )
+               set( QT5_BASE_PATH "$ENV{QT5_BASE_DIR}" )
+               set( CMAKE_PREFIX_PATH "${QT5_BASE_PATH}" )
+       endif()
+       set(PACKAGELIST ${PACKAGELIST}
+               Qt5Core
+               Qt5LinguistTools
+               Qt5Multimedia
+               Qt5PrintSupport
+               Qt5Svg
+               Qt5Widgets
+       )
+       set(Qt5Core_OPTIONS REQUIRED)
+       set(Qt5LinguistTools_OPTIONS REQUIRED)
+       set(Qt5Multimedia_OPTIONS REQUIRED)
+       set(Qt5PrintSupport_OPTIONS REQUIRED)
+       set(Qt5Svg_OPTIONS REQUIRED)
+       set(Qt5Widgets_OPTIONS REQUIRED)
+       if (APPLE)
+               set(PACKAGELIST ${PACKAGELIST} Qt5MacExtras)
+               set(Qt5MacExtras_OPTIONS REQUIRED)
+       endif()
+       if( WIN32 )
+               set(PACKAGELIST ${PACKAGELIST} Qt5WinExtras)
+               set(Qt5WinExtras_OPTIONS REQUIRED)
        endif()
 endif()
 
@@ -1239,11 +1232,6 @@ elseif(QT4_FOUND)
                # That's the name autofoo uses
                set(QT_MULTIMEDIA_LIB 1)
        endif()
-       if(NOT DEFINED MOC_OPTIONS)
-               if(QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 7)
-                       set(MOC_OPTIONS -nn)
-               endif()
-       endif()
        if(WIN32 OR APPLE)
                message(FATAL_ERROR "Windows and macOS builds should use Qt5.")
        endif()
@@ -2196,9 +2184,6 @@ if(BUILD_wireshark AND QT_FOUND)
        )
 
        add_executable(wireshark WIN32 MACOSX_BUNDLE wireshark-qt.cpp ${wireshark_FILES} ${EXTRA_BUNDLE_FILES})
-       if(QT_VERSION EQUAL 4)
-               target_compile_definitions(wireshark PRIVATE Q_NULLPTR=NULL)
-       endif()
        add_dependencies(wireshark version)
        set(PROGLIST ${PROGLIST} wireshark)
        if(CMAKE_VERSION VERSION_LESS "2.8.12"
index 7afc4089970dca7abfe0e84e50b2152516fd1cca..5aedb7fa1e966c9cbedb976d0b2b96a726d20e9b 100644 (file)
@@ -40,7 +40,6 @@ option(ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan) for debugging" OF
 option(ENABLE_CHECKHF_CONFLICT "Enable hf conflict check for debugging (start-up may be slower)" OFF)
 option(ENABLE_CCACHE "Speed up compiling and linking using ccache if possible" OFF)
 
-option(ENABLE_QT5        "Use Qt5 instead of Qt4 to build wireshark" ON)
 option(ENABLE_PCAP       "Enable libpcap support (required for capturing)" ON)
 #
 # AirPcap support is available only on Windows.  It might be nice to have it
index 8a9cce2d6936943199ee252f579b3937aea998a9..3d1c3eaed2e75b6b8bfaa561354d315f3882431b 100755 (executable)
@@ -28,7 +28,6 @@ export docdir = /usr/share/doc/wireshark-doc
 
 override_dh_auto_configure:
        dh_auto_configure -- -DBUILD_xxx2deb=ON -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
-#      -DENABLE_QT5=OFF
 
 override_dh_auto_build:
        $(MAKE) -C $(CURDIR)/obj-* asn1