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>
This commit is contained in:
Cristian Adam
2022-04-21 14:10:09 +02:00
parent 58b0a5056c
commit 88781a003f
88 changed files with 330 additions and 132 deletions

View File

@@ -44,7 +44,7 @@
# ifdef QMLJS_LIBRARY
# define QML_PARSER_EXPORT Q_DECL_EXPORT
# elif QML_BUILD_STATIC_LIB
# elif QMLJS_STATIC_LIBRARY
# define QML_PARSER_EXPORT
# else
# define QML_PARSER_EXPORT Q_DECL_IMPORT

View File

@@ -29,7 +29,7 @@
#if defined(QMLJS_LIBRARY)
# define QMLJS_EXPORT Q_DECL_EXPORT
#elif defined(QML_BUILD_STATIC_LIB)
#elif defined(QMLJS_STATIC_LIBRARY)
# define QMLJS_EXPORT
#else
# define QMLJS_EXPORT Q_DECL_IMPORT