From e34023931f3f20997214e2ffebb242a2caf8e9b7 Mon Sep 17 00:00:00 2001 From: Youssef BEDDAD Date: Fri, 20 May 2022 12:21:41 +0100 Subject: [PATCH] Update: - Added -USE_QT6 in order to choose what to build instead of the default behaviour. --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ba0f51..bf9c49a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,11 +7,13 @@ set(LIMEREPORT_VERSION_RELEASE 6) option(ENABLE_ZINT "Enable libzint build for barcode support" OFF) option(LIMEREPORT_STATIC "Build LimeReport as static library" OFF) +option(USE_QT6 "Use Qt6" OFF) -find_package( - QT NAMES Qt6 Qt5 - COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport REQUIRED - ) +if(USE_QT6) + find_package(QT NAMES Qt6) +else() + find_package(QT NAMES Qt5) +endif(USE_QT6) find_package( Qt${QT_VERSION_MAJOR} COMPONENTS Core Widgets Sql Network Xml Svg Qml PrintSupport REQUIRED