From 523483bccc504bae63e1c120895cc1bf1e59293f Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Mon, 30 Jun 2014 22:10:29 +0200 Subject: [PATCH] Add a WITH_QT4 cmake option to force the use of Qt4 --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2eb5fac1..7cb17317 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,8 +89,14 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") ADD_DEFINITIONS("-DSFMT_MEXP=19937") ENDIF() -#Find Qt and enable the needed features -FIND_PACKAGE(Qt5Widgets) +# Find Qt and enable the needed features +# Default is Qt5 unless WITH_QT4 option is enabled +option(WITH_QT4 "Force thr use of Qt4 libraries" OFF) + +IF(NOT WITH_QT4) + FIND_PACKAGE(Qt5Widgets) +ENDIF() + IF(Qt5Widgets_FOUND) MESSAGE(STATUS "Found Qt ${Qt5Widgets_VERSION_STRING}") ELSE()