[cpp-qt-client] Fix CMakeLists.txt.mustache and CMakeLists.txt for Qt5 (fix #17712) (#17721)

* [cpp-qt-client] Fix CMakeLists.txt.mustache and CMakeLists.txt for Qt5
(fix #17712)

* Restore CMAKE_AUTOMOC
This commit is contained in:
Martin Delille 2024-02-08 03:44:36 +01:00 committed by GitHub
parent 0202bac539
commit c71eb5dfe8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.5)
project({{{packageName}}})
set(CMAKE_AUTOMOC ON)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Network Gui)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Network Gui)
include(GNUInstallDirs)

View File

@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.5)
project(CppQtPetstoreClient)
set(CMAKE_AUTOMOC ON)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Network Gui)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Network Gui)
include(GNUInstallDirs)