diff options
author | Cristian Adam <cristian.adam@qt.io> | 2022-04-21 14:10:09 +0200 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2022-04-29 07:16:53 +0000 |
commit | 88781a003ffd5f699f70b06d2d99325cf4e60c0f (patch) | |
tree | 2b4c888fbcdf57a870302d4d6e68cefef7e19a62 /tests/auto/extensionsystem | |
parent | 58b0a5056c3afe922a2fe8570735da03fb9c3db5 (diff) | |
download | qt-creator-88781a003ffd5f699f70b06d2d99325cf4e60c0f.tar.gz |
CMake: Qt Creator Static build support
This adds the build system feature that allows Qt Creator's libraries
and plugins to be compiled statically.
Fixes some symbol clashes when all plugins are linked into the same
executable.
Support for actually loading static plugins will be added in a separate
commit.
The feature is controlled by QTC_STATIC_BUILD which by default is OFF.
Change-Id: I1fab7953c43e42dc75619e35660029ee067106df
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/extensionsystem')
6 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/plugin1.h b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/plugin1.h index 4b19bf1edf..7ef8965f46 100644 --- a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/plugin1.h +++ b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin1/plugin1.h @@ -29,6 +29,8 @@ #if defined(PLUGIN1_LIBRARY) # define PLUGIN1_EXPORT Q_DECL_EXPORT +#elif defined(PLUGIN1_STATIC_LIBRARY) +# define PLUGIN1_EXPORT #else # define PLUGIN1_EXPORT Q_DECL_IMPORT #endif diff --git a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/plugin2.h b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/plugin2.h index dcb6e88e9e..3bf5b22c3a 100644 --- a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/plugin2.h +++ b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin2/plugin2.h @@ -29,6 +29,8 @@ #if defined(PLUGIN2_LIBRARY) # define PLUGIN2_EXPORT Q_DECL_EXPORT +#elif defined(PLUGIN2_STATIC_LIBRARY) +# define PLUGIN2_EXPORT #else # define PLUGIN2_EXPORT Q_DECL_IMPORT #endif diff --git a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/plugin3.h b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/plugin3.h index 39acae592a..8c9a2e7ce0 100644 --- a/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/plugin3.h +++ b/tests/auto/extensionsystem/pluginmanager/circularplugins/plugin3/plugin3.h @@ -32,6 +32,8 @@ #if defined(PLUGIN3_LIBRARY) # define PLUGIN3_EXPORT Q_DECL_EXPORT +#elif defined(PLUGIN3_STATIC_LIBRARY) +# define PLUGIN3_EXPORT #else # define PLUGIN3_EXPORT Q_DECL_IMPORT #endif diff --git a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/plugin1.h b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/plugin1.h index eaec46856f..397d262e6c 100644 --- a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/plugin1.h +++ b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin1/plugin1.h @@ -29,6 +29,8 @@ #if defined(PLUGIN1_LIBRARY) # define PLUGIN1_EXPORT Q_DECL_EXPORT +#elif defined(PLUGIN1_STATIC_LIBRARY) +# define PLUGIN1_EXPORT #else # define PLUGIN1_EXPORT Q_DECL_IMPORT #endif diff --git a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/plugin2.h b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/plugin2.h index 8d99fce4f6..747626a494 100644 --- a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/plugin2.h +++ b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin2/plugin2.h @@ -29,6 +29,8 @@ #if defined(PLUGIN2_LIBRARY) # define PLUGIN2_EXPORT Q_DECL_EXPORT +#elif defined(PLUGIN2_STATIC_LIBRARY) +# define PLUGIN2_EXPORT #else # define PLUGIN2_EXPORT Q_DECL_IMPORT #endif diff --git a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/plugin3.h b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/plugin3.h index 3d5d21d44c..f71ba5ef73 100644 --- a/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/plugin3.h +++ b/tests/auto/extensionsystem/pluginmanager/correctplugins1/plugin3/plugin3.h @@ -29,6 +29,8 @@ #if defined(PLUGIN3_LIBRARY) # define PLUGIN3_EXPORT Q_DECL_EXPORT +#elif defined(PLUGIN3_STATIC_LIBRARY) +# define PLUGIN3_EXPORT #else # define PLUGIN3_EXPORT Q_DECL_IMPORT #endif |