Skip to content

Commit ed8e24c

Browse files
authored
Merge pull request #2005 from SCIInstitute/qt4-tag
Mark end of Qt4 compatibility
2 parents 89f792b + f02b8f2 commit ed8e24c

File tree

3 files changed

+15
-39
lines changed

3 files changed

+15
-39
lines changed

Superbuild/CMakeLists.txt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# For more information, please see: http://software.sci.utah.edu
2-
#
2+
#
33
# The MIT License
4-
#
4+
#
55
# Copyright (c) 2015 Scientific Computing and Imaging Institute,
66
# University of Utah.
7-
#
8-
#
7+
#
8+
#
99
# Permission is hereby granted, free of charge, to any person obtaining a
1010
# copy of this software and associated documentation files (the "Software"),
1111
# to deal in the Software without restriction, including without limitation
1212
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1313
# and/or sell copies of the Software, and to permit persons to whom the
1414
# Software is furnished to do so, subject to the following conditions:
15-
#
15+
#
1616
# The above copyright notice and this permission notice shall be included
17-
# in all copies or substantial portions of the Software.
18-
#
17+
# in all copies or substantial portions of the Software.
18+
#
1919
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2020
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2121
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -24,8 +24,7 @@
2424
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2525
# DEALINGS IN THE SOFTWARE.
2626

27-
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7 FATAL_ERROR)
28-
#CMAKE_MINIMUM_REQUIRED(VERSION 3.0 FATAL_ERROR)
27+
CMAKE_MINIMUM_REQUIRED(VERSION 3.6 FATAL_ERROR)
2928

3029
IF(POLICY CMP0043)
3130
CMAKE_POLICY(SET CMP0043 OLD)
@@ -37,4 +36,3 @@ ENDIF()
3736
PROJECT(Superbuild)
3837

3938
INCLUDE(${CMAKE_SOURCE_DIR}/Superbuild.cmake)
40-

Superbuild/Superbuild.cmake

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ ENDIF()
4444

4545
INCLUDE( ExternalProject )
4646

47-
# Compute -G arg for configuring external projects with the same CMake generator:
48-
#if(CMAKE_EXTRA_GENERATOR)
49-
# set(gen "${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
50-
#else()
51-
# set(gen "${CMAKE_GENERATOR}" )
52-
#endif()
53-
5447
###########################################
5548
# DETERMINE ARCHITECTURE
5649
# In order for the code to depend on the architecture settings
@@ -99,9 +92,6 @@ OPTION(BUILD_HEADLESS "Build SCIRun without GUI." OFF)
9992
# Configure Qt version
10093

10194
SET(QT5_BUILD_DEFAULT ON)
102-
IF(APPLE) # Until ViewScene works...
103-
SET(QT5_BUILD_DEFAULT OFF)
104-
ENDIF()
10595
OPTION(QT5_BUILD "Qt 5 compatible build" ${QT5_BUILD_DEFAULT})
10696
MARK_AS_ADVANCED(QT5_BUILD)
10797

@@ -132,17 +122,14 @@ ENDIF()
132122
# Configure Qt
133123
IF(NOT BUILD_HEADLESS)
134124
IF (NOT QT5_BUILD)
135-
SET(QT_MIN_VERSION "4.8.1")
125+
SET(QT_MIN_VERSION "4.8.6")
136126
INCLUDE(FindQt4)
137127
FIND_PACKAGE(Qt4 COMPONENTS QtMain QtCore QtGui QtNetwork REQUIRED)
138128
SET(QT_USE_QTOPENGL TRUE)
139129

140130
IF(QT4_FOUND)
141131
MESSAGE(STATUS "QTVERSION=${QTVERSION}")
142132
MESSAGE(STATUS "Found use file: ${QT_USE_FILE}")
143-
IF(APPLE AND ${QTVERSION} VERSION_EQUAL 4.8 AND ${QTVERSION} VERSION_LESS 4.8.5)
144-
MESSAGE(WARNING "Qt 4.8 versions earlier than 4.8.3 contain a bug that disables menu items under some circumstances. Upgrade to a more recent version.")
145-
ENDIF()
146133
ELSE()
147134
MESSAGE(FATAL_ERROR "QT ${QT_MIN_VERSION} or later is required for building the SCIRun GUI")
148135
ENDIF()

src/CMakeLists.txt

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,6 @@ ENDIF()
6868
OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON)
6969
MARK_AS_ADVANCED(BUILD_SHARED_LIBS)
7070

71-
########################################################################
72-
# Headless build
73-
#
74-
#OPTION(BUILD_HEADLESS "Build headless version, without Qt" OFF)
75-
#MARK_AS_ADVANCED(BUILD_HEADLESS)
76-
77-
7871
########################################################################
7972
# Set default CMAKE_BUILD_TYPE
8073
# if empty for Unix Makefile builds
@@ -483,7 +476,6 @@ IF(QT5_BUILD)
483476
ADD_DEFINITIONS(-DQT5_BUILD)
484477
ENDIF()
485478

486-
# TODO: exclude for headless
487479
IF(NOT BUILD_HEADLESS)
488480
IF(NOT QT5_BUILD)
489481
FIND_PACKAGE(Qt4 COMPONENTS QtMain QtCore QtGui QtNetwork QtOpenGL QtSvg REQUIRED)
@@ -508,34 +500,33 @@ IF(NOT BUILD_HEADLESS)
508500

509501
IF(Qt5Core_FOUND)
510502
MESSAGE(STATUS "Found Qt version: ${Qt5Core_VERSION_STRING}")
511-
ADD_DEFINITIONS(-DQT5_VERSION=${Qt5Core_VERSION_STRING})
512-
INCLUDE_DIRECTORIES(${Qt5Core_INCLUDE_DIRS})
503+
ADD_DEFINITIONS(-DQT5_VERSION=${Qt5Core_VERSION_STRING})
504+
INCLUDE_DIRECTORIES(${Qt5Core_INCLUDE_DIRS})
513505
INCLUDE_DIRECTORIES(${Qt5Widgets_INCLUDE_DIRS})
514506
INCLUDE_DIRECTORIES(${Qt5Gui_INCLUDE_DIRS})
515507
INCLUDE_DIRECTORIES(${Qt5Network_INCLUDE_DIRS})
516508
INCLUDE_DIRECTORIES(${Qt5OpenGL_INCLUDE_DIRS})
517509
INCLUDE_DIRECTORIES(${Qt5Concurrent_INCLUDE_DIRS})
518-
INCLUDE_DIRECTORIES(${Qt5PrintSupport_INCLUDE_DIRS})
510+
INCLUDE_DIRECTORIES(${Qt5PrintSupport_INCLUDE_DIRS})
519511
INCLUDE_DIRECTORIES(${Qt5Svg_INCLUDE_DIRS})
520512
ADD_DEFINITIONS(${Qt5Core_DEFINITIONS})
521513
ADD_DEFINITIONS(${Qt5Widgets_DEFINITIONS})
522514
ADD_DEFINITIONS(${Qt5Gui_DEFINITIONS})
523515
ADD_DEFINITIONS(${Qt5Network_DEFINITIONS})
524516
ADD_DEFINITIONS(${Qt5OpenGL_DEFINITIONS})
525517
ADD_DEFINITIONS(${Qt5Concurrent_DEFINITIONS})
526-
ADD_DEFINITIONS(${Qt5PrintSupport_DEFINITIONS})
527-
ADD_DEFINITIONS(${Qt5Svg_DEFINITIONS})
518+
ADD_DEFINITIONS(${Qt5PrintSupport_DEFINITIONS})
519+
ADD_DEFINITIONS(${Qt5Svg_DEFINITIONS})
528520
SET(QT_LIBRARIES Qt5::Widgets)
529521
ELSE()
530522
MESSAGE(FATAL_ERROR "Qt5 is required for building the SCIRun GUI")
531523
ENDIF()
532524

533525
IF(Qt5Core_FOUND)
534526
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
535-
#INCLUDE(${QT_USE_FILE})
536527
ADD_DEFINITIONS(${QT_DEFINITIONS})
537528
ELSE()
538-
MESSAGE(FATAL_ERROR "QT 5.8 or greater is required to build SCIRun")
529+
MESSAGE(FATAL_ERROR "QT 5.13 or greater is required to build SCIRun")
539530
ENDIF()
540531
ENDIF()
541532

0 commit comments

Comments
 (0)