aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2021-03-05 12:28:41 +0100
committerEike Ziller <eike.ziller@qt.io>2021-03-05 12:29:57 +0000
commit30da5aafd7469494ae397703a64113b079ee66aa (patch)
tree58686aae93d28db9a1b6fc3a6207b205ac39ff1c
parent69afdcd290d12427fb529cbee4259c96daa12aa6 (diff)
CMake build/Qt6: Automatically disable build of profilers
Tracing library does not build with Qt 6. Disable that automatically and also the plugins that depend on it. Add some feature info for the Tracing library, though we usually do not add feature information for libraries in general. Change-Id: I51b6993e30ec69d63a031c7bf404ea3887e14d84 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
-rw-r--r--cmake/QtCreatorAPI.cmake6
-rw-r--r--src/libs/tracing/CMakeLists.txt2
-rw-r--r--src/plugins/ctfvisualizer/CMakeLists.txt1
-rw-r--r--src/plugins/perfprofiler/CMakeLists.txt1
-rw-r--r--src/plugins/qmlprofiler/CMakeLists.txt1
5 files changed, 10 insertions, 1 deletions
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake
index c417d3ab9e..df497f70e9 100644
--- a/cmake/QtCreatorAPI.cmake
+++ b/cmake/QtCreatorAPI.cmake
@@ -94,7 +94,7 @@ function(qtc_output_binary_dir varName)
endfunction()
function(add_qtc_library name)
- cmake_parse_arguments(_arg "STATIC;OBJECT;SKIP_TRANSLATION;ALLOW_ASCII_CASTS;UNVERSIONED"
+ cmake_parse_arguments(_arg "STATIC;OBJECT;SKIP_TRANSLATION;ALLOW_ASCII_CASTS;UNVERSIONED;FEATURE_INFO"
"DESTINATION;COMPONENT;SOURCES_PREFIX;BUILD_DEFAULT"
"CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PROPERTIES" ${ARGN}
)
@@ -110,6 +110,7 @@ function(add_qtc_library name)
update_cached_list(__QTC_LIBRARIES "${name}")
+ condition_info(_extra_text _arg_CONDITION)
if (NOT _arg_CONDITION)
set(_arg_CONDITION ON)
endif()
@@ -131,6 +132,9 @@ function(add_qtc_library name)
set(_library_enabled OFF)
endif()
+ if(DEFINED _arg_FEATURE_INFO)
+ add_feature_info("Library ${name}" _library_enabled "${_extra_text}")
+ endif()
if (NOT _library_enabled)
return()
endif()
diff --git a/src/libs/tracing/CMakeLists.txt b/src/libs/tracing/CMakeLists.txt
index 9cc68ec149..b7205527f3 100644
--- a/src/libs/tracing/CMakeLists.txt
+++ b/src/libs/tracing/CMakeLists.txt
@@ -5,6 +5,8 @@ if (WITH_TESTS)
endif()
add_qtc_library(Tracing
+ CONDITION Qt5_VERSION VERSION_LESS 6.0.0
+ FEATURE_INFO
DEPENDS Utils Qt5::Qml Qt5::Quick
PUBLIC_DEPENDS Qt5::Widgets
SOURCES ${TEST_SOURCES}
diff --git a/src/plugins/ctfvisualizer/CMakeLists.txt b/src/plugins/ctfvisualizer/CMakeLists.txt
index 32f1188e3e..1b4df7f2fa 100644
--- a/src/plugins/ctfvisualizer/CMakeLists.txt
+++ b/src/plugins/ctfvisualizer/CMakeLists.txt
@@ -1,4 +1,5 @@
add_qtc_plugin(CtfVisualizer
+ CONDITION TARGET Tracing
DEPENDS Tracing Qt5::QuickWidgets
INCLUDES ${PROJECT_SOURCE_DIR}/src
PLUGIN_DEPENDS Core Debugger ProjectExplorer
diff --git a/src/plugins/perfprofiler/CMakeLists.txt b/src/plugins/perfprofiler/CMakeLists.txt
index 20345cb038..97f82871f0 100644
--- a/src/plugins/perfprofiler/CMakeLists.txt
+++ b/src/plugins/perfprofiler/CMakeLists.txt
@@ -1,4 +1,5 @@
add_qtc_plugin(PerfProfiler
+ CONDITION TARGET Tracing
DEPENDS Tracing Qt5::QuickWidgets
PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport
SOURCES
diff --git a/src/plugins/qmlprofiler/CMakeLists.txt b/src/plugins/qmlprofiler/CMakeLists.txt
index 9b465f3e45..016e874e03 100644
--- a/src/plugins/qmlprofiler/CMakeLists.txt
+++ b/src/plugins/qmlprofiler/CMakeLists.txt
@@ -1,4 +1,5 @@
add_qtc_plugin(QmlProfiler
+ CONDITION TARGET Tracing
DEPENDS QmlDebug QmlJS Tracing Qt5::QuickWidgets
PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport TextEditor
SOURCES