Ticket #50424: patch-choose_qt.diff

File patch-choose_qt.diff, 982 bytes (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 9 years ago)
  • cmake/Modules/Geant4InterfaceOptions.cmake

    old new  
    6969# Configure Qt Support if needed (CROSSPLATFORM).
    7070#
    7171option(GEANT4_USE_QT "Build Geant4 with Qt4 support" OFF)
     72option(GEANT4_FORCE_QT4 "When building Qt support require Qt4 only" OFF)
     73mark_as_advanced(GEANT4_FORCE_QT4)
    7274
    7375if(GEANT4_USE_QT)
    7476  # Find and configure Qt and OpenGL - require 4
     
    8284    set(QT_USE_IMPORTED_TARGETS ON)
    8385  endif()
    8486
    85   find_package(Qt5Core QUIET)
    86   find_package(Qt5Gui QUIET)
    87   find_package(Qt5Widgets QUIET)
    88   find_package(Qt5OpenGL QUIET)
    89   find_package(Qt5PrintSupport QUIET)
     87  if(NOT GEANT4_FORCE_QT4)
     88    find_package(Qt5Core QUIET)
     89    find_package(Qt5Gui QUIET)
     90    find_package(Qt5Widgets QUIET)
     91    find_package(Qt5OpenGL QUIET)
     92    find_package(Qt5PrintSupport QUIET)
     93  endif()
    9094
    9195  if(Qt5Core_FOUND
    9296      AND Qt5Gui_FOUND