forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -94,7 +94,7 @@ function(qtc_output_binary_dir varName)
|
|||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(add_qtc_library name)
|
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"
|
"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}
|
"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}")
|
update_cached_list(__QTC_LIBRARIES "${name}")
|
||||||
|
|
||||||
|
condition_info(_extra_text _arg_CONDITION)
|
||||||
if (NOT _arg_CONDITION)
|
if (NOT _arg_CONDITION)
|
||||||
set(_arg_CONDITION ON)
|
set(_arg_CONDITION ON)
|
||||||
endif()
|
endif()
|
||||||
@@ -131,6 +132,9 @@ function(add_qtc_library name)
|
|||||||
set(_library_enabled OFF)
|
set(_library_enabled OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(DEFINED _arg_FEATURE_INFO)
|
||||||
|
add_feature_info("Library ${name}" _library_enabled "${_extra_text}")
|
||||||
|
endif()
|
||||||
if (NOT _library_enabled)
|
if (NOT _library_enabled)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ if (WITH_TESTS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_qtc_library(Tracing
|
add_qtc_library(Tracing
|
||||||
|
CONDITION Qt5_VERSION VERSION_LESS 6.0.0
|
||||||
|
FEATURE_INFO
|
||||||
DEPENDS Utils Qt5::Qml Qt5::Quick
|
DEPENDS Utils Qt5::Qml Qt5::Quick
|
||||||
PUBLIC_DEPENDS Qt5::Widgets
|
PUBLIC_DEPENDS Qt5::Widgets
|
||||||
SOURCES ${TEST_SOURCES}
|
SOURCES ${TEST_SOURCES}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
add_qtc_plugin(CtfVisualizer
|
add_qtc_plugin(CtfVisualizer
|
||||||
|
CONDITION TARGET Tracing
|
||||||
DEPENDS Tracing Qt5::QuickWidgets
|
DEPENDS Tracing Qt5::QuickWidgets
|
||||||
INCLUDES ${PROJECT_SOURCE_DIR}/src
|
INCLUDES ${PROJECT_SOURCE_DIR}/src
|
||||||
PLUGIN_DEPENDS Core Debugger ProjectExplorer
|
PLUGIN_DEPENDS Core Debugger ProjectExplorer
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
add_qtc_plugin(PerfProfiler
|
add_qtc_plugin(PerfProfiler
|
||||||
|
CONDITION TARGET Tracing
|
||||||
DEPENDS Tracing Qt5::QuickWidgets
|
DEPENDS Tracing Qt5::QuickWidgets
|
||||||
PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport
|
PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport
|
||||||
SOURCES
|
SOURCES
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
add_qtc_plugin(QmlProfiler
|
add_qtc_plugin(QmlProfiler
|
||||||
|
CONDITION TARGET Tracing
|
||||||
DEPENDS QmlDebug QmlJS Tracing Qt5::QuickWidgets
|
DEPENDS QmlDebug QmlJS Tracing Qt5::QuickWidgets
|
||||||
PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport TextEditor
|
PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport TextEditor
|
||||||
SOURCES
|
SOURCES
|
||||||
|
|||||||
Reference in New Issue
Block a user