Skip to content

Commit

Permalink
traymon: cmake: only check for Qt4 if Qt5 is not found
Browse files Browse the repository at this point in the history
This fixes problems that exist if both Qt versions are installed.

If Qt5 is available, it is used. Only if it is not available,
Qt4 is tried.
  • Loading branch information
pstorz authored and franku committed Feb 14, 2019
1 parent c8cf732 commit 5615279
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions core/src/qt-tray-monitor/CMakeLists.txt
Expand Up @@ -29,9 +29,17 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

find_package(Qt4)

find_package(Qt5 COMPONENTS Core Widgets)
IF(Qt5Widgets_FOUND)
message(STATUS "Found QT5Widgets")
ELSE()
message(STATUS "QT5Widgets NOT found, checking for Qt4 ...")
find_package(Qt4)
IF (NOT Qt4_FOUND)
message(FATAL_ERROR "Both Qt5 and Qt4 not found, cannot build tray-monitor")
ENDIF()
ENDIF()


IF(HAVE_WIN32)
include_directories(
Expand Down

0 comments on commit 5615279

Please sign in to comment.