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 /src/libs/modelinglib | |
parent | 58b0a5056c3afe922a2fe8570735da03fb9c3db5 (diff) |
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 'src/libs/modelinglib')
-rw-r--r-- | src/libs/modelinglib/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/libs/modelinglib/qmt/infrastructure/qmt_global.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/libs/modelinglib/CMakeLists.txt b/src/libs/modelinglib/CMakeLists.txt index db79b99ee3..fcead64fd0 100644 --- a/src/libs/modelinglib/CMakeLists.txt +++ b/src/libs/modelinglib/CMakeLists.txt @@ -1,5 +1,4 @@ add_qtc_library(Modeling - DEFINES MODELING_LIBRARY DEPENDS Qt5::Widgets Utils PUBLIC_DEPENDS OptionalSvg INCLUDES qtserialization/inc diff --git a/src/libs/modelinglib/qmt/infrastructure/qmt_global.h b/src/libs/modelinglib/qmt/infrastructure/qmt_global.h index e01c0b87c6..670deaeac5 100644 --- a/src/libs/modelinglib/qmt/infrastructure/qmt_global.h +++ b/src/libs/modelinglib/qmt/infrastructure/qmt_global.h @@ -29,6 +29,8 @@ #if defined(MODELING_LIBRARY) # define QMT_EXPORT Q_DECL_EXPORT +#elif defined(MODELING_STATIC_LIBRARY) +# define QMT_EXPORT #else # define QMT_EXPORT Q_DECL_IMPORT #endif |