aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/clangsupport
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2022-04-21 14:10:09 +0200
committerCristian Adam <cristian.adam@qt.io>2022-04-29 07:16:53 +0000
commit88781a003ffd5f699f70b06d2d99325cf4e60c0f (patch)
tree2b4c888fbcdf57a870302d4d6e68cefef7e19a62 /src/libs/clangsupport
parent58b0a5056c3afe922a2fe8570735da03fb9c3db5 (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/clangsupport')
-rw-r--r--src/libs/clangsupport/CMakeLists.txt1
-rw-r--r--src/libs/clangsupport/clangsupport_global.h4
2 files changed, 2 insertions, 3 deletions
diff --git a/src/libs/clangsupport/CMakeLists.txt b/src/libs/clangsupport/CMakeLists.txt
index aa3c0ec3da..41b42ca2d0 100644
--- a/src/libs/clangsupport/CMakeLists.txt
+++ b/src/libs/clangsupport/CMakeLists.txt
@@ -7,7 +7,6 @@ add_qtc_library(ClangSupport
CLANG_VERSION="${CLANG_VERSION}"
CLANG_INCLUDE_DIR="${LLVM_LIBRARY_DIR}/clang/${CLANG_VERSION}/include"
CLANG_BINDIR="${LLVM_TOOLS_BINARY_DIR}"
- DEFINES CLANGSUPPORT_BUILD_LIB
PUBLIC_INCLUDES
"${CMAKE_CURRENT_LIST_DIR}"
SOURCES
diff --git a/src/libs/clangsupport/clangsupport_global.h b/src/libs/clangsupport/clangsupport_global.h
index f8428e8ecf..db94b89613 100644
--- a/src/libs/clangsupport/clangsupport_global.h
+++ b/src/libs/clangsupport/clangsupport_global.h
@@ -31,9 +31,9 @@
#include <utils/smallstringfwd.h>
-#if defined(CLANGSUPPORT_BUILD_LIB)
+#if defined(CLANGSUPPORT_LIBRARY)
# define CLANGSUPPORT_EXPORT Q_DECL_EXPORT
-#elif defined(CLANGSUPPORT_BUILD_STATIC_LIB)
+#elif defined(CLANGSUPPORT_STATIC_LIBRARY)
# define CLANGSUPPORT_EXPORT
#else
# define CLANGSUPPORT_EXPORT Q_DECL_IMPORT