From 0433b8c47923577cbac44005718d17b7d871cf41 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Wed, 22 May 2024 13:07:55 +0200 Subject: [PATCH] Qml2Puppet: fix stand alone puppet builds Change-Id: I24f5ca625429c636052d0c92c495a20a6942c92f Reviewed-by: Burak Hancerli Reviewed-by: Reviewed-by: Qt CI Patch Build Bot Reviewed-by: Tim Jenssen --- src/tools/qml2puppet/CMakeLists.txt | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/tools/qml2puppet/CMakeLists.txt b/src/tools/qml2puppet/CMakeLists.txt index e77887adcca..26fd0b6dd21 100644 --- a/src/tools/qml2puppet/CMakeLists.txt +++ b/src/tools/qml2puppet/CMakeLists.txt @@ -26,10 +26,7 @@ if (NOT QT_CREATOR_API_DEFINED) COMPONENTS Concurrent Core Gui Network PrintSupport Qml Quick Sql Widgets Xml REQUIRED ) -endif() - -if (NOT TARGET QmlPuppetCommunication) - include(../../libs/qmlpuppetcommunication/QmlPuppetCommunication.cmake) + set(IS_STAND_ALONE_PUPPET_BUILD ON) endif() add_qtc_executable(qml2puppet @@ -38,7 +35,6 @@ add_qtc_executable(qml2puppet DEPENDS Qt::CorePrivate Qt::Widgets Qt::QmlPrivate Qt::QuickPrivate Qt::Network Qt::GuiPrivate - app_version QmlPuppetCommunication INCLUDES ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} @@ -52,6 +48,15 @@ add_qtc_executable(qml2puppet OUTPUT_NAME qml2puppet-${IDE_VERSION} ) +if (IS_STAND_ALONE_PUPPET_BUILD) + include(../../libs/qmlpuppetcommunication/QmlPuppetCommunication.cmake) + configure_file(../../app/app_version.h.cmakein app/app_version.h ESCAPE_QUOTES) +else() + extend_qtc_executable(qml2puppet + DEPENDS app_version + ) +endif() + extend_qtc_executable(qml2puppet CONDITION Qt6_VERSION SOURCES