diff --git a/QXlsx/CMakeLists.txt b/QXlsx/CMakeLists.txt index 5dcb876..7207f94 100644 --- a/QXlsx/CMakeLists.txt +++ b/QXlsx/CMakeLists.txt @@ -13,7 +13,9 @@ set(CMAKE_AUTOMOC ON) include(GNUInstallDirs) -find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui REQUIRED) +if(NOT DEFINED QT_VERSION_MAJOR) + find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui REQUIRED) +endif() find_package(Qt${QT_VERSION_MAJOR} 5.9 COMPONENTS Core Gui REQUIRED) set(EXPORT_NAME QXlsxQt${QT_VERSION_MAJOR}) @@ -150,7 +152,7 @@ target_compile_definitions(QXlsx PRIVATE QT_USE_QSTRINGBUILDER QT_NO_SIGNALS_SLOTS_KEYWORDS QT_USE_FAST_OPERATOR_PLUS - QT_DISABLE_DEPRECATED_BEFORE=0x050F00 + QT_DISABLE_DEPRECATED_BEFORE=0x060200 ) if (NOT WIN32)