forked from qt-creator/qt-creator
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>
56 lines
1.8 KiB
CMake
56 lines
1.8 KiB
CMake
# TODO: Make Qt5::Gui optional -- if really needed that is.
|
|
|
|
add_qtc_library(CPlusPlus
|
|
DEPENDS Utils Qt5::Concurrent
|
|
PUBLIC_DEPENDS 3rd_cplusplus Qt5::Gui
|
|
SOURCES
|
|
ASTParent.cpp ASTParent.h
|
|
ASTPath.cpp ASTPath.h
|
|
AlreadyConsideredClassContainer.h
|
|
BackwardsScanner.cpp BackwardsScanner.h
|
|
CppDocument.cpp CppDocument.h
|
|
CppRewriter.cpp CppRewriter.h
|
|
DependencyTable.cpp DependencyTable.h
|
|
DeprecatedGenTemplateInstance.cpp DeprecatedGenTemplateInstance.h
|
|
ExpressionUnderCursor.cpp ExpressionUnderCursor.h
|
|
FastPreprocessor.cpp FastPreprocessor.h
|
|
FindUsages.cpp FindUsages.h
|
|
Icons.cpp Icons.h
|
|
LookupContext.cpp LookupContext.h
|
|
LookupItem.cpp LookupItem.h
|
|
Macro.cpp Macro.h
|
|
MatchingText.cpp MatchingText.h
|
|
NamePrettyPrinter.cpp NamePrettyPrinter.h
|
|
Overview.cpp Overview.h
|
|
PPToken.cpp PPToken.h
|
|
PreprocessorClient.cpp PreprocessorClient.h
|
|
PreprocessorEnvironment.cpp PreprocessorEnvironment.h
|
|
ResolveExpression.cpp ResolveExpression.h
|
|
SimpleLexer.cpp SimpleLexer.h
|
|
SnapshotSymbolVisitor.cpp SnapshotSymbolVisitor.h
|
|
SymbolNameVisitor.cpp SymbolNameVisitor.h
|
|
TypeOfExpression.cpp TypeOfExpression.h
|
|
TypePrettyPrinter.cpp TypePrettyPrinter.h
|
|
cppmodelmanagerbase.cpp cppmodelmanagerbase.h
|
|
findcdbbreakpoint.cpp findcdbbreakpoint.h
|
|
pp-cctype.h pp-engine.cpp
|
|
pp-engine.h pp-scanner.cpp
|
|
pp-scanner.h
|
|
pp.h
|
|
SKIP_PCH
|
|
)
|
|
|
|
set(export_symbol_declaration DEFINES CPLUSPLUS_BUILD_LIB)
|
|
if (QTC_STATIC_BUILD)
|
|
set(export_symbol_declaration PUBLIC_DEFINES CPLUSPLUS_BUILD_STATIC_LIB)
|
|
endif()
|
|
extend_qtc_target(CPlusPlus ${export_symbol_declaration})
|
|
|
|
if(TARGET CPlusPlus)
|
|
qtc_enable_release_for_debug_configuration()
|
|
if (BUILD_WITH_PCH)
|
|
target_precompile_headers(CPlusPlus PRIVATE
|
|
"${QtCreator_SOURCE_DIR}/src/shared/qtcreator_gui_pch.h")
|
|
endif()
|
|
endif()
|