diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/CMakeLists.txt.mustache index 62ccdff1bfe..2a560439bbb 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/CMakeLists.txt.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/CMakeLists.txt.mustache @@ -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) diff --git a/samples/client/petstore/cpp-qt/client/CMakeLists.txt b/samples/client/petstore/cpp-qt/client/CMakeLists.txt index cf6ea32ab3b..51c19e891bd 100644 --- a/samples/client/petstore/cpp-qt/client/CMakeLists.txt +++ b/samples/client/petstore/cpp-qt/client/CMakeLists.txt @@ -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)