forked from osmocom/wireshark
CMake: More Qt4 removal.
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>
This commit is contained in:
parent
90a00e1971
commit
55f6f6593c
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue