diff options
Diffstat (limited to 'share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt')
-rw-r--r-- | share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt b/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt index d7eda0b02d..12653a1671 100644 --- a/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt +++ b/share/qtcreator/templates/wizards/projects/consoleapp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.14) project(%{ProjectName} LANGUAGES CXX) @@ -12,7 +12,8 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) @if %{HasTranslation} -find_package(Qt5 COMPONENTS Core LinguistTools REQUIRED) +find_package(QT NAMES Qt6 Qt5 COMPONENTS Core LinguistTools REQUIRED) +find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core LinguistTools REQUIRED) set(TS_FILES %{TsFileName}) @else @@ -25,7 +26,7 @@ add_executable(%{ProjectName} ${TS_FILES} @endif ) -target_link_libraries(%{ProjectName} Qt5::Core) +target_link_libraries(%{ProjectName} Qt${QT_VERSION_MAJOR}::Core) @if %{HasTranslation} qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) |