diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-05-21 12:22:35 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-05-23 11:13:21 +0000 |
commit | 6fb9bf453f6f67af42649034af4ec5745e12d901 (patch) | |
tree | e848c277b7c2dac30fa0254051994e7c121ea5c3 /src/plugins/qmlprofiler | |
parent | 9645687e539bd0ea286fb4136329458c3db3694e (diff) |
CMake build: Add ability to disable building of individual plugins
Adds a cache entry "BUILD_PLUGIN_${NAME}", defaulting to ON which
can be set to OFF to disable building of a plugin.
Adds a extend_qtc_plugin function that should be used to add
properties to a plugin after add_qtc_plugin, instead of the
standard CMake functions target_... . The new function results
in a no-op if the plugin was disabled.
Change-Id: I57f6799620aea0aaa8b56acead4815ccced95911
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r-- | src/plugins/qmlprofiler/CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/qmlprofiler/CMakeLists.txt b/src/plugins/qmlprofiler/CMakeLists.txt index ab8ddb712c..63df2d6a01 100644 --- a/src/plugins/qmlprofiler/CMakeLists.txt +++ b/src/plugins/qmlprofiler/CMakeLists.txt @@ -47,8 +47,9 @@ add_qtc_plugin(QmlProfiler scenegraphtimelinemodel.cpp scenegraphtimelinemodel.h ) -if (WITH_TESTS) - target_sources(QmlProfiler PRIVATE +extend_qtc_plugin(QmlProfiler + CONDITION WITH_TESTS + SOURCES tests/debugmessagesmodel_test.cpp tests/debugmessagesmodel_test.h tests/fakedebugserver.cpp tests/fakedebugserver.h tests/flamegraphmodel_test.cpp tests/flamegraphmodel_test.h @@ -71,5 +72,4 @@ if (WITH_TESTS) tests/qmlprofilertraceclient_test.cpp tests/qmlprofilertraceclient_test.h tests/qmlprofilertraceview_test.cpp tests/qmlprofilertraceview_test.h tests/tests.qrc - ) -endif() +) |