From 5c37fb1f6574eedf23d6b6708e5faa205518af50 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 16 Jul 2021 11:10:34 +0200 Subject: [PATCH] QmlProfiler/PerfProfiler: Restore support for Qt >= 6.2 First (try to) add the target as Qt Creator plugin, *then* check whether it exists. Amends: 5aff1419fa0ebee1e94e7a47b467a3dd289fec34 Change-Id: Ia7c318c0ffb7bbaa21159ddf9de88b80ad0033cb Reviewed-by: Eike Ziller --- src/plugins/perfprofiler/CMakeLists.txt | 8 ++++---- src/plugins/qmlprofiler/CMakeLists.txt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/perfprofiler/CMakeLists.txt b/src/plugins/perfprofiler/CMakeLists.txt index d83e9e65523..e1ee249ed04 100644 --- a/src/plugins/perfprofiler/CMakeLists.txt +++ b/src/plugins/perfprofiler/CMakeLists.txt @@ -48,10 +48,6 @@ if(${Qt5_VERSION} VERSION_LESS "6.2.0") perfprofiler.qrc ) else() # < Qt 6.2 - if (NOT TARGET PerfProfiler) - return() - endif() - add_qtc_plugin(PerfProfiler DEPENDS Tracing Qt5::QuickWidgets PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport @@ -59,6 +55,10 @@ else() # < Qt 6.2 ${TEST_SOURCES} ) + if (NOT TARGET PerfProfiler) + return() + endif() + qt_add_resources(PerfProfiler perfprofiler PREFIX "/perfprofiler" tracepoints.sh diff --git a/src/plugins/qmlprofiler/CMakeLists.txt b/src/plugins/qmlprofiler/CMakeLists.txt index c5fa5399f86..aee047a576d 100644 --- a/src/plugins/qmlprofiler/CMakeLists.txt +++ b/src/plugins/qmlprofiler/CMakeLists.txt @@ -79,10 +79,6 @@ if(${Qt5_VERSION} VERSION_LESS "6.2.0") qml/qmlprofiler.qrc ) else() # < Qt 6.2 - if (NOT TARGET QmlProfiler) - return() - endif() - add_qtc_plugin(QmlProfiler DEPENDS QmlDebug QmlJS Tracing Qt5::QuickWidgets PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport TextEditor @@ -90,6 +86,10 @@ else() # < Qt 6.2 ${TEST_SOURCES} ) + if (NOT TARGET QmlProfiler) + return() + endif() + set(QMLPROFILER_QML_FILES qml/QmlProfilerFlameGraphView.qml )