From c71eb5dfe8bb87c416a89f96714aef2a0ecb83b9 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 8 Feb 2024 03:44:36 +0100 Subject: [PATCH] [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 --- .../src/main/resources/cpp-qt-client/CMakeLists.txt.mustache | 3 +++ samples/client/petstore/cpp-qt/client/CMakeLists.txt | 3 +++ 2 files changed, 6 insertions(+) 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)