forked from qt-creator/qt-creator
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:
@@ -61,11 +61,15 @@ set(__additional_imported_components ATSPI2_nolink) # Work around QTBUG-97023
|
||||
foreach(comp IN LISTS Qt5_FIND_COMPONENTS __additional_imported_components)
|
||||
if(TARGET Qt6::${comp})
|
||||
if (NOT TARGET Qt5::${comp})
|
||||
if (QT_BUILD_SHARED_LIBS)
|
||||
set_property(TARGET Qt6::${comp} PROPERTY IMPORTED_GLOBAL TRUE)
|
||||
endif()
|
||||
add_library(Qt5::${comp} ALIAS Qt6::${comp})
|
||||
endif()
|
||||
if (TARGET Qt6::${comp}Private AND NOT TARGET Qt5::${comp}Private)
|
||||
if (QT_BUILD_SHARED_LIBS)
|
||||
set_property(TARGET Qt6::${comp}Private PROPERTY IMPORTED_GLOBAL TRUE)
|
||||
endif()
|
||||
add_library(Qt5::${comp}Private ALIAS Qt6::${comp}Private)
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -22,9 +22,7 @@ else()
|
||||
endif()
|
||||
set(YAML_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../src/libs/3rdparty/yaml-cpp)
|
||||
add_qtc_library(yaml-cpp
|
||||
DEFINES YAML_CPP_DLL yaml_cpp_EXPORTS
|
||||
INCLUDES ${YAML_SOURCE_DIR}/include
|
||||
PUBLIC_DEFINES YAML_CPP_DLL
|
||||
PUBLIC_INCLUDES ${YAML_SOURCE_DIR}/include
|
||||
PROPERTIES AUTOMOC OFF AUTOUIC OFF
|
||||
SOURCES
|
||||
@@ -116,6 +114,12 @@ else()
|
||||
${YAML_SOURCE_DIR}/src/tag.h
|
||||
${YAML_SOURCE_DIR}/src/token.h
|
||||
)
|
||||
if (NOT QTC_STATIC_BUILD)
|
||||
extend_qtc_target(yaml-cpp
|
||||
DEFINES yaml_cpp_EXPORTS
|
||||
PUBLIC_DEFINES YAML_CPP_DLL)
|
||||
endif()
|
||||
|
||||
if(TARGET yaml-cpp)
|
||||
set(yaml-cpp_FOUND 1)
|
||||
set_package_properties(yaml-cpp PROPERTIES DESCRIPTION "using internal src/libs/3rdparty/yaml-cpp")
|
||||
|
@@ -44,6 +44,7 @@ option(BUILD_TESTS_BY_DEFAULT "Build tests by default. This can be used to build
|
||||
option(QTC_SEPARATE_DEBUG_INFO "Extract debug information from binary files." OFF)
|
||||
option(WITH_SCCACHE_SUPPORT "Enables support for building with SCCACHE and separate debug info with MSVC, which SCCACHE normally doesn't support." OFF)
|
||||
option(WITH_CCACHE_SUPPORT "Enables support for building with CCACHE and separate debug info with MSVC, which CCACHE normally doesn't support." OFF)
|
||||
option(QTC_STATIC_BUILD "Builds libraries and plugins as static libraries" OFF)
|
||||
|
||||
# If we provide a list of plugins, executables, libraries, then the BUILD_<type>_BY_DEFAULT will be set to OFF
|
||||
# and for every element we set BUILD_<type>_<elment> to ON
|
||||
@@ -157,7 +158,7 @@ function(add_qtc_library name)
|
||||
endif()
|
||||
|
||||
set(library_type SHARED)
|
||||
if (_arg_STATIC)
|
||||
if (_arg_STATIC OR QTC_STATIC_BUILD)
|
||||
set(library_type STATIC)
|
||||
endif()
|
||||
if (_arg_OBJECT)
|
||||
@@ -168,7 +169,12 @@ function(add_qtc_library name)
|
||||
add_library(QtCreator::${name} ALIAS ${name})
|
||||
|
||||
if (${name} MATCHES "^[^0-9-]+$")
|
||||
string(TOUPPER "${name}_LIBRARY" EXPORT_SYMBOL)
|
||||
if (QTC_STATIC_BUILD)
|
||||
set(export_symbol_suffix "STATIC_LIBRARY")
|
||||
else()
|
||||
set(export_symbol_suffix "LIBRARY")
|
||||
endif()
|
||||
string(TOUPPER "${name}_${export_symbol_suffix}" EXPORT_SYMBOL)
|
||||
endif()
|
||||
|
||||
if (WITH_TESTS)
|
||||
@@ -185,7 +191,7 @@ function(add_qtc_library name)
|
||||
SOURCES ${_arg_SOURCES}
|
||||
INCLUDES ${_arg_INCLUDES}
|
||||
PUBLIC_INCLUDES ${_arg_PUBLIC_INCLUDES}
|
||||
DEFINES ${EXPORT_SYMBOL} ${default_defines_copy} ${_arg_DEFINES} ${TEST_DEFINES}
|
||||
DEFINES ${default_defines_copy} ${_arg_DEFINES} ${TEST_DEFINES}
|
||||
PUBLIC_DEFINES ${_arg_PUBLIC_DEFINES}
|
||||
DEPENDS ${_arg_DEPENDS} ${IMPLICIT_DEPENDS}
|
||||
PUBLIC_DEPENDS ${_arg_PUBLIC_DEPENDS}
|
||||
@@ -194,6 +200,12 @@ function(add_qtc_library name)
|
||||
EXTRA_TRANSLATIONS ${_arg_EXTRA_TRANSLATIONS}
|
||||
)
|
||||
|
||||
if (QTC_STATIC_BUILD)
|
||||
extend_qtc_target(${name} PUBLIC_DEFINES ${EXPORT_SYMBOL})
|
||||
else()
|
||||
extend_qtc_target(${name} DEFINES ${EXPORT_SYMBOL})
|
||||
endif()
|
||||
|
||||
# everything is different with SOURCES_PREFIX
|
||||
if (NOT _arg_SOURCES_PREFIX)
|
||||
get_filename_component(public_build_interface_dir "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE)
|
||||
@@ -253,6 +265,7 @@ function(add_qtc_library name)
|
||||
set(COMPONENT_OPTION "COMPONENT" "${_arg_COMPONENT}")
|
||||
endif()
|
||||
|
||||
if (NOT QTC_STATIC_BUILD)
|
||||
install(TARGETS ${name}
|
||||
EXPORT QtCreator
|
||||
RUNTIME
|
||||
@@ -272,6 +285,7 @@ function(add_qtc_library name)
|
||||
COMPONENT Devel EXCLUDE_FROM_ALL
|
||||
OPTIONAL
|
||||
)
|
||||
endif()
|
||||
|
||||
qtc_enable_separate_debug_info(${name} "${IDE_LIBRARY_PATH}")
|
||||
|
||||
@@ -279,7 +293,7 @@ function(add_qtc_library name)
|
||||
qtc_enable_sanitize(${SANITIZE_FLAGS})
|
||||
endif()
|
||||
|
||||
if (NAMELINK_OPTION)
|
||||
if (NAMELINK_OPTION AND NOT QTC_STATIC_BUILD)
|
||||
install(TARGETS ${name}
|
||||
LIBRARY
|
||||
DESTINATION "${IDE_LIBRARY_PATH}"
|
||||
@@ -298,7 +312,7 @@ endfunction(add_qtc_library)
|
||||
function(add_qtc_plugin target_name)
|
||||
cmake_parse_arguments(_arg
|
||||
"SKIP_INSTALL;INTERNAL_ONLY;SKIP_TRANSLATION;EXPORT;SKIP_PCH"
|
||||
"VERSION;COMPAT_VERSION;PLUGIN_JSON_IN;PLUGIN_PATH;PLUGIN_NAME;OUTPUT_NAME;BUILD_DEFAULT"
|
||||
"VERSION;COMPAT_VERSION;PLUGIN_JSON_IN;PLUGIN_PATH;PLUGIN_NAME;OUTPUT_NAME;BUILD_DEFAULT;PLUGIN_CLASS"
|
||||
"CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PLUGIN_DEPENDS;PLUGIN_RECOMMENDS;PLUGIN_TEST_DEPENDS;PROPERTIES"
|
||||
${ARGN}
|
||||
)
|
||||
@@ -421,13 +435,25 @@ function(add_qtc_plugin target_name)
|
||||
CONTENT "${plugin_json}")
|
||||
endif()
|
||||
|
||||
add_library(${target_name} SHARED ${_arg_SOURCES})
|
||||
if (QTC_STATIC_BUILD)
|
||||
set(library_type STATIC)
|
||||
else()
|
||||
set(library_type SHARED)
|
||||
endif()
|
||||
|
||||
add_library(${target_name} ${library_type} ${_arg_SOURCES})
|
||||
add_library(QtCreator::${target_name} ALIAS ${target_name})
|
||||
|
||||
set_public_headers(${target_name} "${_arg_SOURCES}")
|
||||
update_resource_files_list("${_arg_SOURCES}")
|
||||
|
||||
### Generate EXPORT_SYMBOL
|
||||
string(TOUPPER "${name}_LIBRARY" EXPORT_SYMBOL)
|
||||
if (QTC_STATIC_BUILD)
|
||||
set(export_symbol_suffix "STATIC_LIBRARY")
|
||||
else()
|
||||
set(export_symbol_suffix "LIBRARY")
|
||||
endif()
|
||||
string(TOUPPER "${name}_${export_symbol_suffix}" EXPORT_SYMBOL)
|
||||
|
||||
if (WITH_TESTS)
|
||||
set(TEST_DEFINES WITH_TESTS SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
@@ -440,7 +466,7 @@ function(add_qtc_plugin target_name)
|
||||
extend_qtc_target(${target_name}
|
||||
INCLUDES ${_arg_INCLUDES}
|
||||
PUBLIC_INCLUDES ${_arg_PUBLIC_INCLUDES}
|
||||
DEFINES ${EXPORT_SYMBOL} ${DEFAULT_DEFINES} ${_arg_DEFINES} ${TEST_DEFINES}
|
||||
DEFINES ${DEFAULT_DEFINES} ${_arg_DEFINES} ${TEST_DEFINES}
|
||||
PUBLIC_DEFINES ${_arg_PUBLIC_DEFINES}
|
||||
DEPENDS ${_arg_DEPENDS} ${_DEP_PLUGINS} ${IMPLICIT_DEPENDS}
|
||||
PUBLIC_DEPENDS ${_arg_PUBLIC_DEPENDS}
|
||||
@@ -449,6 +475,13 @@ function(add_qtc_plugin target_name)
|
||||
EXTRA_TRANSLATIONS ${_arg_EXTRA_TRANSLATIONS}
|
||||
)
|
||||
|
||||
if (QTC_STATIC_BUILD)
|
||||
extend_qtc_target(${target_name} PUBLIC_DEFINES ${EXPORT_SYMBOL}
|
||||
DEFINES QT_STATICPLUGIN)
|
||||
else()
|
||||
extend_qtc_target(${target_name} DEFINES ${EXPORT_SYMBOL})
|
||||
endif()
|
||||
|
||||
get_filename_component(public_build_interface_dir "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE)
|
||||
file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
target_include_directories(${target_name}
|
||||
@@ -471,6 +504,10 @@ function(add_qtc_plugin target_name)
|
||||
set(skip_translation ON)
|
||||
endif()
|
||||
|
||||
if(NOT _arg_PLUGIN_CLASS)
|
||||
set(_arg_PLUGIN_CLASS ${target_name}Plugin)
|
||||
endif()
|
||||
|
||||
qtc_output_binary_dir(_output_binary_dir)
|
||||
set_target_properties(${target_name} PROPERTIES
|
||||
LINK_DEPENDS_NO_SHARED ON
|
||||
@@ -490,6 +527,7 @@ function(add_qtc_plugin target_name)
|
||||
OUTPUT_NAME "${name}"
|
||||
QT_SKIP_TRANSLATION "${skip_translation}"
|
||||
QT_COMPILE_OPTIONS_DISABLE_WARNINGS OFF
|
||||
QTC_PLUGIN_CLASS_NAME ${_arg_PLUGIN_CLASS}
|
||||
${_arg_PROPERTIES}
|
||||
)
|
||||
|
||||
@@ -497,7 +535,7 @@ function(add_qtc_plugin target_name)
|
||||
enable_pch(${target_name})
|
||||
endif()
|
||||
|
||||
if (NOT _arg_SKIP_INSTALL)
|
||||
if (NOT _arg_SKIP_INSTALL AND NOT QTC_STATIC_BUILD)
|
||||
if (_arg_EXPORT)
|
||||
set(export QtCreator${target_name})
|
||||
else()
|
||||
|
@@ -109,6 +109,7 @@ set(__QTC_PLUGINS "" CACHE INTERNAL "*** Internal ***")
|
||||
set(__QTC_LIBRARIES "" CACHE INTERNAL "*** Internal ***")
|
||||
set(__QTC_EXECUTABLES "" CACHE INTERNAL "*** Internal ***")
|
||||
set(__QTC_TESTS "" CACHE INTERNAL "*** Internal ***")
|
||||
set(__QTC_RESOURCE_FILES "" CACHE INTERNAL "*** Internal ***")
|
||||
|
||||
# handle SCCACHE hack
|
||||
# SCCACHE does not work with the /Zi option, which makes each compilation write debug info
|
||||
@@ -230,6 +231,16 @@ function(set_public_headers target sources)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(update_resource_files_list sources)
|
||||
foreach(source IN LISTS sources)
|
||||
if (source MATCHES "\.qrc$")
|
||||
get_filename_component(resource_name ${source} NAME_WE)
|
||||
string(REPLACE "-" "_" resource_name ${resource_name})
|
||||
update_cached_list(__QTC_RESOURCE_FILES "${resource_name}")
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(set_public_includes target includes)
|
||||
foreach(inc_dir IN LISTS includes)
|
||||
if (NOT IS_ABSOLUTE ${inc_dir})
|
||||
@@ -510,6 +521,7 @@ function(extend_qtc_target target_name)
|
||||
endif()
|
||||
|
||||
set_public_headers(${target_name} "${_arg_SOURCES}")
|
||||
update_resource_files_list("${_arg_SOURCES}")
|
||||
|
||||
foreach(file IN LISTS _arg_EXPLICIT_MOC)
|
||||
set_explicit_moc(${target_name} "${file}")
|
||||
|
@@ -7,8 +7,8 @@ install(TARGETS app_version EXPORT QtCreator)
|
||||
add_subdirectory(libs)
|
||||
add_subdirectory(share)
|
||||
add_subdirectory(shared)
|
||||
add_subdirectory(app)
|
||||
add_subdirectory(plugins)
|
||||
add_subdirectory(app)
|
||||
add_subdirectory(tools)
|
||||
|
||||
install(
|
||||
|
@@ -35,6 +35,39 @@ if (NOT TARGET qtcreator)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (QTC_STATIC_BUILD)
|
||||
set(plugins_to_import "")
|
||||
set(source_file_content "#include <QtPlugin>\n")
|
||||
foreach(plugin IN LISTS __QTC_PLUGINS)
|
||||
if(TARGET ${plugin})
|
||||
list(APPEND plugins_to_import "${plugin}")
|
||||
# TODO ${plugin}Plugin is not correct for all plugins as the class name
|
||||
get_target_property(plugin_class ${plugin} QTC_PLUGIN_CLASS_NAME)
|
||||
string(APPEND source_file_content "Q_IMPORT_PLUGIN(${plugin_class})\n")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
string(APPEND source_file_content
|
||||
"struct ResourcesInitializer {\n"
|
||||
" ResourcesInitializer() {\n")
|
||||
foreach(resource_file IN LISTS __QTC_RESOURCE_FILES)
|
||||
string(APPEND source_file_content " Q_INIT_RESOURCE(${resource_file});\n")
|
||||
endforeach()
|
||||
string(APPEND source_file_content
|
||||
" }\n"
|
||||
"} g_resources_initializer;\n")
|
||||
|
||||
file(GENERATE
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/plugin_imports.cpp"
|
||||
CONTENT "${source_file_content}"
|
||||
)
|
||||
extend_qtc_target(qtcreator
|
||||
DEPENDS ${plugins_to_import}
|
||||
SOURCES "${CMAKE_CURRENT_BINARY_DIR}/plugin_imports.cpp"
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set(RC_APPLICATION_NAME "${IDE_DISPLAY_NAME}")
|
||||
set(RC_VERSION "${IDE_VERSION}.0")
|
||||
|
7
src/libs/3rdparty/cplusplus/CMakeLists.txt
vendored
7
src/libs/3rdparty/cplusplus/CMakeLists.txt
vendored
@@ -1,6 +1,5 @@
|
||||
add_qtc_library(3rd_cplusplus OBJECT
|
||||
PUBLIC_DEPENDS Qt5::Core Utils
|
||||
DEFINES CPLUSPLUS_BUILD_LIB
|
||||
SOURCES
|
||||
AST.cpp AST.h
|
||||
ASTClone.cpp
|
||||
@@ -45,6 +44,12 @@ add_qtc_library(3rd_cplusplus OBJECT
|
||||
PROPERTIES POSITION_INDEPENDENT_CODE ON
|
||||
)
|
||||
|
||||
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(3rd_cplusplus ${export_symbol_declaration})
|
||||
|
||||
if(TARGET 3rd_cplusplus)
|
||||
qtc_enable_release_for_debug_configuration()
|
||||
if (BUILD_WITH_PCH)
|
||||
|
@@ -4,13 +4,12 @@ else()
|
||||
set(HIGHLIGHTING_BUILD_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
add_qtc_library(KSyntaxHighlighting SHARED
|
||||
add_qtc_library(KSyntaxHighlighting
|
||||
BUILD_DEFAULT ${HIGHLIGHTING_BUILD_DEFAULT}
|
||||
INCLUDES autogenerated/
|
||||
PUBLIC_INCLUDES
|
||||
src/lib
|
||||
autogenerated/src/lib
|
||||
DEFINES KF5SyntaxHighlighting_EXPORTS
|
||||
DEPENDS Qt5::Network Qt5::Widgets
|
||||
SOURCES
|
||||
autogenerated/src/lib/ksyntaxhighlighting_logging.cpp autogenerated/src/lib/ksyntaxhighlighting_logging.h
|
||||
@@ -43,6 +42,13 @@ add_qtc_library(KSyntaxHighlighting SHARED
|
||||
src/lib/worddelimiters.cpp src/lib/worddelimiters_p.h
|
||||
src/lib/xml_p.h
|
||||
)
|
||||
|
||||
set(export_symbol_declaration DEFINES KF5SyntaxHighlighting_EXPORTS)
|
||||
if (QTC_STATIC_BUILD)
|
||||
set(export_symbol_declaration PUBLIC_DEFINES KSYNTAXHIGHLIGHTING_STATIC_DEFINE)
|
||||
endif()
|
||||
extend_qtc_target(KSyntaxHighlighting ${export_symbol_declaration})
|
||||
|
||||
qtc_add_public_header(autogenerated/src/lib/State)
|
||||
|
||||
if(TARGET KSyntaxHighlighting)
|
||||
|
@@ -24,13 +24,17 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qlitehtml/src/CMakeLists.txt)
|
||||
option(BUILD_LIBRARY_QLITEHTML "Build library qlitehtml." ${BUILD_LIBRARIES_BY_DEFAULT})
|
||||
set(QLITEHTML_VERSION_COMPAT ${IDE_VERSION_COMPAT} CACHE STRING "")
|
||||
if(BUILD_LIBRARY_QLITEHTML)
|
||||
set(QLITEHTML_BIN_PATH ${IDE_BIN_PATH})
|
||||
set(QLITEHTML_LIBRARY_PATH ${IDE_LIBRARY_PATH})
|
||||
set(QLITEHTML_LIBRARY_ARCHIVE_PATH ${IDE_LIBRARY_ARCHIVE_PATH})
|
||||
set(QLITEHTML_EXPORT QtCreator)
|
||||
set(QLITEHTML_DEVEL_COMPONENT Devel)
|
||||
set(QLITEHTML_DEVEL_EXCLUDE_FROM_ALL ON)
|
||||
set(QLITEHTML_HEADER_PATH "${IDE_HEADER_INSTALL_PATH}/src/lib/qlitehtml")
|
||||
if (QTC_STATIC_BUILD)
|
||||
set(QLITEHTML_LIBRARY_TYPE STATIC)
|
||||
else()
|
||||
set(QLITEHTML_BIN_PATH ${IDE_BIN_PATH})
|
||||
set(QLITEHTML_LIBRARY_PATH ${IDE_LIBRARY_PATH})
|
||||
endif()
|
||||
set(QT_VERSION_MAJOR ${Qt5_VERSION_MAJOR})
|
||||
option(BUILD_TESTING "Build litehtml tests" OFF) # otherwise litehtml downloads googletest
|
||||
add_subdirectory(qlitehtml/src)
|
||||
|
@@ -47,14 +47,12 @@ class QAbstractButton;
|
||||
class QSplitter;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#ifndef ADS_STATIC
|
||||
#ifdef ADVANCEDDOCKINGSYSTEM_LIBRARY
|
||||
#define ADS_EXPORT Q_DECL_EXPORT
|
||||
#if defined(ADVANCEDDOCKINGSYSTEM_LIBRARY)
|
||||
# define ADS_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(ADVANCEDDOCKINGSYSTEM_STATIC_LIBRARY)
|
||||
# define ADS_EXPORT
|
||||
#else
|
||||
#define ADS_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
#else
|
||||
#define ADS_EXPORT
|
||||
# define ADS_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
//#define ADS_DEBUG_PRINT
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(AGGREGATION_LIBRARY)
|
||||
# define AGGREGATION_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(AGGREGATION_STATIC_LIBRARY)
|
||||
# define AGGREGATION_EXPORT
|
||||
#else
|
||||
# define AGGREGATION_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -1,10 +1,7 @@
|
||||
# TODO: Support static build, currently being done with CPLUSPLUS_BUILD_STATIC_LIB
|
||||
# -- if really needed that is.
|
||||
# TODO: Make Qt5::Gui optional -- if really needed that is.
|
||||
|
||||
add_qtc_library(CPlusPlus
|
||||
DEPENDS Utils Qt5::Concurrent
|
||||
DEFINES CPLUSPLUS_BUILD_LIB
|
||||
PUBLIC_DEPENDS 3rd_cplusplus Qt5::Gui
|
||||
SOURCES
|
||||
ASTParent.cpp ASTParent.h
|
||||
@@ -43,6 +40,12 @@ add_qtc_library(CPlusPlus
|
||||
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)
|
||||
|
@@ -30,6 +30,8 @@
|
||||
|
||||
#if defined(EXTENSIONSYSTEM_LIBRARY)
|
||||
# define EXTENSIONSYSTEM_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(EXTENSIONSYSTEM_STATIC_LIBRARY)
|
||||
# define EXTENSIONSYSTEM_EXPORT
|
||||
#else
|
||||
# define EXTENSIONSYSTEM_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -31,7 +31,7 @@
|
||||
|
||||
#if defined(GLSL_LIBRARY)
|
||||
# define GLSL_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(GLSL_BUILD_STATIC_LIB)
|
||||
#elif defined(GLSL_STATIC_LIBRARY)
|
||||
# define GLSL_EXPORT
|
||||
#else
|
||||
# define GLSL_EXPORT Q_DECL_IMPORT
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(LANGUAGESERVERPROTOCOL_LIBRARY)
|
||||
# define LANGUAGESERVERPROTOCOL_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(LANGUAGESERVERPROTOCOL_STATIC_LIBRARY)
|
||||
# define LANGUAGESERVERPROTOCOL_EXPORT
|
||||
#else
|
||||
# define LANGUAGESERVERPROTOCOL_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
#if defined(LANGUAGEUTILS_LIBRARY)
|
||||
# define LANGUAGEUTILS_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(LANGUAGEUTILS_BUILD_STATIC_LIB)
|
||||
#elif defined(LANGUAGEUTILS_STATIC_LIBRARY)
|
||||
# define LANGUAGEUTILS_EXPORT
|
||||
#else
|
||||
# define LANGUAGEUTILS_EXPORT Q_DECL_IMPORT
|
||||
|
@@ -1,5 +1,4 @@
|
||||
add_qtc_library(Modeling
|
||||
DEFINES MODELING_LIBRARY
|
||||
DEPENDS Qt5::Widgets Utils
|
||||
PUBLIC_DEPENDS OptionalSvg
|
||||
INCLUDES qtserialization/inc
|
||||
|
@@ -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
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#if defined(QMLDEBUG_LIBRARY)
|
||||
# define QMLDEBUG_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(QMLDEBUG_STATIC_LIB)
|
||||
#elif defined(QMLDEBUG_STATIC_LIBRARY)
|
||||
# define QMLDEBUG_EXPORT
|
||||
#else
|
||||
# define QMLDEBUG_EXPORT Q_DECL_IMPORT
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
# if defined(QMLEDITORWIDGETS_LIBRARY)
|
||||
# define QMLEDITORWIDGETS_EXPORT Q_DECL_EXPORT
|
||||
# elif defined(BUILD_QMLJSDEBUGGER_STATIC_LIB)
|
||||
# elif defined(QMLEDITORWIDGETS_STATIC_LIBRARY)
|
||||
# define QMLEDITORWIDGETS_EXPORT
|
||||
# else
|
||||
# define QMLEDITORWIDGETS_EXPORT Q_DECL_IMPORT
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -1,7 +1,6 @@
|
||||
add_qtc_library(Sqlite
|
||||
PROPERTIES AUTOMOC OFF AUTOUIC OFF
|
||||
PUBLIC_DEFINES
|
||||
BUILD_SQLITE_LIBRARY
|
||||
SQLITE_CORE
|
||||
DEPENDS Qt5::Core Threads::Threads ${CMAKE_DL_LIBS}
|
||||
PUBLIC_INCLUDES
|
||||
@@ -45,7 +44,7 @@ add_qtc_library(Sqlite
|
||||
extend_qtc_library(Sqlite DEFINES SQLITE_CUSTOM_INCLUDE=config.h)
|
||||
|
||||
if (APPLE)
|
||||
extend_qtc_library(Sqlite DEFINES _BSD_SOURCE)
|
||||
extend_qtc_library(Sqlite DEFINES _BSD_SOURCE)
|
||||
elseif (UNIX)
|
||||
extend_qtc_library(Sqlite DEFINES _POSIX_C_SOURCE=200809L _GNU_SOURCE _DEFAULT_SOURCE)
|
||||
extend_qtc_library(Sqlite DEFINES _POSIX_C_SOURCE=200809L _GNU_SOURCE _DEFAULT_SOURCE)
|
||||
endif()
|
||||
|
@@ -29,9 +29,9 @@
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
#if defined(BUILD_SQLITE_LIBRARY)
|
||||
#if defined(SQLITE_LIBRARY)
|
||||
# define SQLITE_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(BUILD_SQLITE_STATIC_LIBRARY)
|
||||
#elif defined(SQLITE_STATIC_LIBRARY)
|
||||
# define SQLITE_EXPORT
|
||||
#else
|
||||
# define SQLITE_EXPORT Q_DECL_IMPORT
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(QTCSSH_LIBRARY)
|
||||
# define QSSH_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(QTCSSH_STATIC_LIBRARY)
|
||||
# define QSSH_EXPORT
|
||||
#else
|
||||
# define QSSH_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(TRACING_LIBRARY)
|
||||
# define TRACING_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(TRACING_STATIC_LIBRARY)
|
||||
# define TRACING_EXPORT
|
||||
#else
|
||||
# define TRACING_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -39,7 +39,7 @@
|
||||
|
||||
#include <cctype>
|
||||
|
||||
Q_LOGGING_CATEGORY(log, "qtc.utils.filesearch", QtWarningMsg)
|
||||
Q_LOGGING_CATEGORY(searchLog, "qtc.utils.filesearch", QtWarningMsg)
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
@@ -143,13 +143,13 @@ void FileSearch::operator()(QFutureInterface<FileSearchResultList> &futureInterf
|
||||
{
|
||||
if (futureInterface.isCanceled())
|
||||
return;
|
||||
qCDebug(log) << "Searching in" << item.filePath;
|
||||
qCDebug(searchLog) << "Searching in" << item.filePath;
|
||||
futureInterface.setProgressRange(0, 1);
|
||||
futureInterface.setProgressValue(0);
|
||||
FileSearchResultList results;
|
||||
QString tempString;
|
||||
if (!getFileContent(item.filePath, item.encoding, &tempString, fileToContentsMap)) {
|
||||
qCDebug(log) << "- failed to get content for" << item.filePath;
|
||||
qCDebug(searchLog) << "- failed to get content for" << item.filePath;
|
||||
futureInterface.cancel(); // failure
|
||||
return;
|
||||
}
|
||||
@@ -227,7 +227,7 @@ void FileSearch::operator()(QFutureInterface<FileSearchResultList> &futureInterf
|
||||
futureInterface.reportResult(results);
|
||||
futureInterface.setProgressValue(1);
|
||||
}
|
||||
qCDebug(log) << "- finished searching in" << item.filePath;
|
||||
qCDebug(searchLog) << "- finished searching in" << item.filePath;
|
||||
}
|
||||
|
||||
FileSearchRegExp::FileSearchRegExp(const QString &searchTerm, QTextDocument::FindFlags flags,
|
||||
@@ -263,13 +263,13 @@ void FileSearchRegExp::operator()(QFutureInterface<FileSearchResultList> &future
|
||||
}
|
||||
if (futureInterface.isCanceled())
|
||||
return;
|
||||
qCDebug(log) << "Searching in" << item.filePath;
|
||||
qCDebug(searchLog) << "Searching in" << item.filePath;
|
||||
futureInterface.setProgressRange(0, 1);
|
||||
futureInterface.setProgressValue(0);
|
||||
FileSearchResultList results;
|
||||
QString tempString;
|
||||
if (!getFileContent(item.filePath, item.encoding, &tempString, fileToContentsMap)) {
|
||||
qCDebug(log) << "- failed to get content for" << item.filePath;
|
||||
qCDebug(searchLog) << "- failed to get content for" << item.filePath;
|
||||
futureInterface.cancel(); // failure
|
||||
return;
|
||||
}
|
||||
@@ -304,7 +304,7 @@ void FileSearchRegExp::operator()(QFutureInterface<FileSearchResultList> &future
|
||||
futureInterface.reportResult(results);
|
||||
futureInterface.setProgressValue(1);
|
||||
}
|
||||
qCDebug(log) << "- finished searching in" << item.filePath;
|
||||
qCDebug(searchLog) << "- finished searching in" << item.filePath;
|
||||
}
|
||||
|
||||
struct SearchState
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
#if defined(UTILS_LIBRARY)
|
||||
# define QTCREATOR_UTILS_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(QTCREATOR_UTILS_STATIC_LIB) // Abuse single files for manual tests
|
||||
#elif defined(UTILS_STATIC_LIBRARY) // Abuse single files for manual tests
|
||||
# define QTCREATOR_UTILS_EXPORT
|
||||
#else
|
||||
# define QTCREATOR_UTILS_EXPORT Q_DECL_IMPORT
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(ANDROID_LIBRARY)
|
||||
# define ANDROID_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(ANDROID_STATIC_LIBRARY)
|
||||
# define ANDROID_EXPORT
|
||||
#else
|
||||
# define ANDROID_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -1,4 +1,5 @@
|
||||
add_qtc_plugin(AutoTest
|
||||
PLUGIN_CLASS AutotestPlugin
|
||||
PLUGIN_DEPENDS Core CppEditor Debugger ProjectExplorer QmlJSTools TextEditor
|
||||
PLUGIN_TEST_DEPENDS QmakeProjectManager QtSupport QbsProjectManager
|
||||
SOURCES
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(AUTOTEST_LIBRARY)
|
||||
# define AUTOTESTSHARED_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(AUTOTEST_STATIC_LIBRARY)
|
||||
# define AUTOTESTSHARED_EXPORT
|
||||
#else
|
||||
# define AUTOTESTSHARED_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -1,4 +1,5 @@
|
||||
add_qtc_plugin(AutotoolsProjectManager
|
||||
PLUGIN_CLASS AutotoolsProjectPlugin
|
||||
PLUGIN_DEPENDS Core CppEditor ProjectExplorer QtSupport
|
||||
SOURCES
|
||||
autogenstep.cpp autogenstep.h
|
||||
|
@@ -1,4 +1,5 @@
|
||||
add_qtc_plugin(Boot2Qt
|
||||
PLUGIN_CLASS QdbPlugin
|
||||
DEPENDS Qt5::Network QtcSsh
|
||||
PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport RemoteLinux
|
||||
SOURCES
|
||||
|
@@ -1,4 +1,5 @@
|
||||
add_qtc_plugin(CMakeProjectManager
|
||||
PLUGIN_CLASS CMakeProjectPlugin
|
||||
DEPENDS QmlJS
|
||||
PLUGIN_DEPENDS Core CppEditor ProjectExplorer TextEditor QtSupport
|
||||
SOURCES
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(CMAKEPROJECTMANAGER_LIBRARY)
|
||||
# define CMAKE_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(CMAKEPROJECTMANAGER_STATIC_LIBRARY)
|
||||
# define CMAKE_EXPORT
|
||||
#else
|
||||
# define CMAKE_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -1,5 +1,4 @@
|
||||
add_qtc_plugin(CppEditor
|
||||
DEFINES CPPEDITOR_LIBRARY
|
||||
DEPENDS Qt5::Network Qt5::Xml
|
||||
PUBLIC_DEPENDS CPlusPlus ClangSupport Qt5::Widgets
|
||||
PLUGIN_DEPENDS Core ProjectExplorer TextEditor
|
||||
|
@@ -1,4 +1,5 @@
|
||||
add_qtc_plugin(CVS
|
||||
PLUGIN_CLASS CvsPlugin
|
||||
PLUGIN_DEPENDS Core TextEditor VcsBase
|
||||
SOURCES
|
||||
annotationhighlighter.cpp annotationhighlighter.h
|
||||
|
@@ -1,4 +1,5 @@
|
||||
add_qtc_plugin(Designer
|
||||
PLUGIN_CLASS FormEditorPlugin
|
||||
CONDITION TARGET Qt5::DesignerComponents AND TARGET Qt5::Designer
|
||||
DEPENDS designerintegrationv2
|
||||
Qt5::Designer Qt5::PrintSupport Qt5::DesignerComponents
|
||||
@@ -35,3 +36,10 @@ extend_qtc_plugin(Designer
|
||||
CONDITION WITH_TESTS AND TARGET Qt5::DesignerComponents AND TARGET Qt5::Designer
|
||||
SOURCES gotoslot_test.cpp
|
||||
)
|
||||
|
||||
if (QTC_STATIC_BUILD)
|
||||
get_target_property(_designerType Qt5::Designer TYPE)
|
||||
if (${_designerType} STREQUAL "STATIC_LIBRARY")
|
||||
extend_qtc_target(Designer PUBLIC_DEFINES QT_DESIGNER_STATIC)
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(DESIGNER_LIBRARY)
|
||||
# define DESIGNER_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(DESIGNER_STATIC_LIBRARY)
|
||||
# define DESIGNER_EXPORT
|
||||
#else
|
||||
# define DESIGNER_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -1,6 +1,5 @@
|
||||
add_qtc_plugin(DiffEditor
|
||||
PLUGIN_DEPENDS Core TextEditor
|
||||
DEFINES DIFFEDITOR_LIBRARY
|
||||
SOURCES
|
||||
descriptionwidgetwatcher.cpp descriptionwidgetwatcher.h
|
||||
diffeditor.cpp diffeditor.h
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(DIFFEDITOR_LIBRARY)
|
||||
# define DIFFEDITOR_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(DIFFEDITOR_STATIC_LIBRARY)
|
||||
# define DIFFEDITOR_EXPORT
|
||||
#else
|
||||
# define DIFFEDITOR_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -1,4 +1,5 @@
|
||||
add_qtc_plugin(GenericProjectManager
|
||||
PLUGIN_CLASS GenericProjectPlugin
|
||||
PLUGIN_DEPENDS Core ProjectExplorer QtSupport TextEditor
|
||||
PLUGIN_TEST_DEPENDS CppEditor
|
||||
PLUGIN_RECOMMENDS CppEditor
|
||||
|
@@ -1,4 +1,5 @@
|
||||
add_qtc_plugin(GLSLEditor
|
||||
PLUGIN_CLASS GlslEditorPlugin
|
||||
DEPENDS GLSL
|
||||
PLUGIN_DEPENDS Core CppEditor TextEditor
|
||||
SOURCES
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(LANGUAGECLIENT_LIBRARY)
|
||||
# define LANGUAGECLIENT_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(LANGUAGECLIENT_STATIC_LIBRARY)
|
||||
# define LANGUAGECLIENT_EXPORT
|
||||
#else
|
||||
# define LANGUAGECLIENT_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -1,4 +1,5 @@
|
||||
add_qtc_plugin(MesonProjectManager
|
||||
PLUGIN_CLASS MesonProjectPlugin
|
||||
DEPENDS QmlJS
|
||||
PLUGIN_DEPENDS Core CppEditor ProjectExplorer TextEditor QtSupport
|
||||
SOURCES
|
||||
|
@@ -1,5 +1,4 @@
|
||||
add_qtc_plugin(ModelEditor
|
||||
DEFINES MODELEDITOR_LIBRARY
|
||||
DEPENDS Modeling Qt5::Core Qt5::Gui Qt5::Widgets
|
||||
PLUGIN_DEPENDS Core CppEditor ProjectExplorer
|
||||
SOURCES
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(MODELEDITOR_LIBRARY)
|
||||
# define MODELEDITOR_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(MODELEDITOR_STATIC_LIBRARY)
|
||||
# define MODELEDITOR_EXPORT
|
||||
#else
|
||||
# define MODELEDITOR_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(PERFPROFILER_LIBRARY)
|
||||
# define PERFPROFILER_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(PERFPROFILER_STATIC_LIBRARY)
|
||||
# define PERFPROFILER_EXPORT
|
||||
#else
|
||||
# define PERFPROFILER_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -60,7 +60,7 @@ protected:
|
||||
|
||||
void setDisplayName(const QString &displayName);
|
||||
void setIcon(const QIcon &icon);
|
||||
void setCombinedIcon(const Utils::FilePath &small, const Utils::FilePath &large);
|
||||
void setCombinedIcon(const Utils::FilePath &smallIcon, const Utils::FilePath &largeIcon);
|
||||
void setConstructionFunction(const std::function<IDevicePtr ()> &constructor);
|
||||
void setCreator(const std::function<IDevicePtr()> &creator);
|
||||
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(QBSPROJECTMANAGER_LIBRARY)
|
||||
# define QBSPROJECTMANAGER_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(QBSPROJECTMANAGER_STATIC_LIBRARY)
|
||||
# define QBSPROJECTMANAGER_EXPORT
|
||||
#else
|
||||
# define QBSPROJECTMANAGER_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(QMAKEPROJECTMANAGER_LIBRARY)
|
||||
# define QMAKEPROJECTMANAGER_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(QMAKEPROJECTMANAGER_STATIC_LIBRARY)
|
||||
# define QMAKEPROJECTMANAGER_EXPORT
|
||||
#else
|
||||
# define QMAKEPROJECTMANAGER_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -9,7 +9,6 @@ add_qtc_plugin(QmlDesigner
|
||||
QmlJS LanguageUtils QmlEditorWidgets AdvancedDockingSystem
|
||||
Qt5::QuickWidgets Qt5::CorePrivate Sqlite Qt5::Xml Qt5::Svg
|
||||
DEFINES
|
||||
DESIGNER_CORE_LIBRARY
|
||||
IDE_LIBRARY_BASENAME=\"${IDE_LIBRARY_BASE_PATH}\"
|
||||
SHARE_QML_PATH="${CMAKE_CURRENT_SOURCE_DIR}/../../../share/qtcreator/qmldesigner"
|
||||
PUBLIC_INCLUDES
|
||||
@@ -59,7 +58,16 @@ add_qtc_plugin(QmlDesigner
|
||||
include(qmldesignercore.cmake)
|
||||
extend_with_qmldesigner_core(QmlDesigner)
|
||||
|
||||
if (QTC_STATIC_BUILD)
|
||||
get_target_property(_designerType Qt5::Designer TYPE)
|
||||
if (${_designerType} STREQUAL "STATIC_LIBRARY")
|
||||
extend_qtc_target(QmlDesigner PUBLIC_DEFINES QT_DESIGNER_STATIC)
|
||||
endif()
|
||||
extend_qtc_target(QmlDesigner PUBLIC_DEPENDS TextEditor)
|
||||
endif()
|
||||
|
||||
add_qtc_plugin(assetexporterplugin
|
||||
PLUGIN_CLASS AssetExporterPlugin
|
||||
CONDITION TARGET QmlDesigner
|
||||
DEPENDS Core ProjectExplorer QmlDesigner Utils Qt5::Qml Qt5::QuickPrivate
|
||||
PUBLIC_INCLUDES assetexporterplugin
|
||||
@@ -81,6 +89,7 @@ add_qtc_plugin(assetexporterplugin
|
||||
)
|
||||
|
||||
add_qtc_plugin(componentsplugin
|
||||
PLUGIN_CLASS ComponentsPlugin
|
||||
CONDITION TARGET QmlDesigner
|
||||
DEPENDS Core QmlDesigner Utils Qt5::Qml
|
||||
DEFINES COMPONENTS_LIBRARY
|
||||
@@ -96,6 +105,7 @@ add_qtc_plugin(componentsplugin
|
||||
)
|
||||
|
||||
add_qtc_plugin(qmlpreviewplugin
|
||||
PLUGIN_CLASS QmlPreviewWidgetPlugin
|
||||
CONDITION TARGET QmlDesigner
|
||||
DEPENDS Core ProjectExplorer QmlDesigner Utils Qt5::Qml
|
||||
SOURCES
|
||||
@@ -106,6 +116,7 @@ add_qtc_plugin(qmlpreviewplugin
|
||||
)
|
||||
|
||||
add_qtc_plugin(qtquickplugin
|
||||
PLUGIN_CLASS QtQuickPlugin
|
||||
CONDITION TARGET QmlDesigner
|
||||
DEPENDS Core QmlDesigner Utils Qt5::Qml
|
||||
DEFINES QTQUICK_LIBRARY
|
||||
|
@@ -30,9 +30,9 @@
|
||||
|
||||
// Unnecessary since core isn't a dll any more.
|
||||
|
||||
#if defined(DESIGNER_CORE_LIBRARY)
|
||||
#if defined(QMLDESIGNER_LIBRARY)
|
||||
#define QMLDESIGNERCORE_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(DESIGNER_STATIC_CORE_LIBRARY)
|
||||
#elif defined(QMLDESIGNER_STATIC_LIBRARY)
|
||||
#define QMLDESIGNERCORE_EXPORT
|
||||
#else
|
||||
#define QMLDESIGNERCORE_EXPORT Q_DECL_IMPORT
|
||||
|
@@ -43,7 +43,7 @@ enum FoundLicense {
|
||||
};
|
||||
|
||||
namespace Internal {
|
||||
ExtensionSystem::IPlugin *licenseCheckerPlugin()
|
||||
inline ExtensionSystem::IPlugin *licenseCheckerPlugin()
|
||||
{
|
||||
const ExtensionSystem::PluginSpec *pluginSpec = Utils::findOrDefault(
|
||||
ExtensionSystem::PluginManager::plugins(),
|
||||
@@ -55,8 +55,7 @@ ExtensionSystem::IPlugin *licenseCheckerPlugin()
|
||||
}
|
||||
} // namespace Internal
|
||||
|
||||
|
||||
FoundLicense checkLicense()
|
||||
inline FoundLicense checkLicense()
|
||||
{
|
||||
if (auto plugin = Internal::licenseCheckerPlugin()) {
|
||||
bool retVal = false;
|
||||
@@ -72,7 +71,7 @@ FoundLicense checkLicense()
|
||||
return community;
|
||||
}
|
||||
|
||||
QString licensee()
|
||||
inline QString licensee()
|
||||
{
|
||||
if (auto plugin = Internal::licenseCheckerPlugin()) {
|
||||
QString retVal;
|
||||
|
@@ -28,7 +28,6 @@ function(extend_with_qmldesigner_core target_name)
|
||||
QtSupport
|
||||
TextEditor
|
||||
DEFINES
|
||||
DESIGNER_CORE_LIBRARY
|
||||
TEST_EXPORTS
|
||||
INCLUDES
|
||||
${CMAKE_CURRENT_FUNCTION_LIST_DIR}
|
||||
@@ -420,4 +419,11 @@ function(extend_with_qmldesigner_core target_name)
|
||||
SOURCES_PREFIX ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../../../share/qtcreator/qml/qmlpuppet/container
|
||||
SOURCES sharedmemory_qt.cpp
|
||||
)
|
||||
|
||||
set(export_symbol_declaration DEFINES QMLDESIGNER_LIBRARY)
|
||||
if (QTC_STATIC_BUILD)
|
||||
set(export_symbol_declaration PUBLIC_DEFINES QMLDESIGNER_STATIC_LIBRARY)
|
||||
endif()
|
||||
extend_qtc_target(${target_name} ${export_symbol_declaration})
|
||||
|
||||
endfunction()
|
||||
|
@@ -73,7 +73,7 @@ static void handleAction(const SelectionContext &context)
|
||||
}
|
||||
ProjectExplorerPlugin::runStartupProject(Constants::QML_PREVIEW_RUN_MODE, skipDeploy);
|
||||
} else {
|
||||
QmlPreviewPlugin::stopAllRunControls();
|
||||
QmlPreviewWidgetPlugin::stopAllRunControls();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,14 +81,14 @@ static void handleAction(const SelectionContext &context)
|
||||
QmlPreviewAction::QmlPreviewAction() : ModelNodeAction(livePreviewId,
|
||||
"Live Preview",
|
||||
previewIcon.icon(),
|
||||
QmlPreviewPlugin::tr("Show Live Preview"),
|
||||
QmlPreviewWidgetPlugin::tr("Show Live Preview"),
|
||||
ComponentCoreConstants::qmlPreviewCategory,
|
||||
QKeySequence("Alt+p"),
|
||||
20,
|
||||
&handleAction,
|
||||
&SelectionContextFunctors::always)
|
||||
{
|
||||
if (!QmlPreviewPlugin::getPreviewPlugin())
|
||||
if (!QmlPreviewWidgetPlugin::getPreviewPlugin())
|
||||
defaultAction()->setVisible(false);
|
||||
|
||||
defaultAction()->setCheckable(true);
|
||||
@@ -97,7 +97,7 @@ QmlPreviewAction::QmlPreviewAction() : ModelNodeAction(livePreviewId,
|
||||
void QmlPreviewAction::updateContext()
|
||||
{
|
||||
if (selectionContext().view()->isAttached())
|
||||
QmlPreviewPlugin::setQmlFile();
|
||||
QmlPreviewWidgetPlugin::setQmlFile();
|
||||
|
||||
defaultAction()->setSelectionContext(selectionContext());
|
||||
}
|
||||
@@ -111,9 +111,9 @@ ZoomPreviewAction::ZoomPreviewAction()
|
||||
: m_zoomAction(new ZoomAction(nullptr))
|
||||
{
|
||||
QObject::connect(m_zoomAction.get(), &ZoomAction::zoomLevelChanged, [=](float d) {
|
||||
QmlPreviewPlugin::setZoomFactor(d);
|
||||
QmlPreviewWidgetPlugin::setZoomFactor(d);
|
||||
});
|
||||
if (!QmlPreviewPlugin::getPreviewPlugin())
|
||||
if (!QmlPreviewWidgetPlugin::getPreviewPlugin())
|
||||
m_zoomAction->setVisible(false);
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ SwitchLanguageAction::SwitchLanguageAction()
|
||||
: m_switchLanguageAction(new SwitchLanguageComboboxAction(nullptr))
|
||||
{
|
||||
QObject::connect(m_switchLanguageAction.get(), &SwitchLanguageComboboxAction::currentLocaleChanged,
|
||||
&QmlPreviewPlugin::setLanguageLocale);
|
||||
&QmlPreviewWidgetPlugin::setLanguageLocale);
|
||||
}
|
||||
|
||||
QAction *SwitchLanguageAction::action() const
|
||||
|
@@ -53,7 +53,7 @@ Q_DECLARE_METATYPE(QmlPreview::QmlPreviewRunControlList)
|
||||
namespace QmlDesigner {
|
||||
static QObject *s_previewPlugin = nullptr;
|
||||
|
||||
QmlPreviewPlugin::QmlPreviewPlugin()
|
||||
QmlPreviewWidgetPlugin::QmlPreviewWidgetPlugin()
|
||||
{
|
||||
DesignerActionManager &designerActionManager =
|
||||
QmlDesignerPlugin::instance()->designerActionManager();
|
||||
@@ -92,12 +92,12 @@ QmlPreviewPlugin::QmlPreviewPlugin()
|
||||
}
|
||||
}
|
||||
|
||||
QString QmlPreviewPlugin::pluginName() const
|
||||
QString QmlPreviewWidgetPlugin::pluginName() const
|
||||
{
|
||||
return QLatin1String("QmlPreviewPlugin");
|
||||
}
|
||||
|
||||
void QmlPreviewPlugin::stopAllRunControls()
|
||||
void QmlPreviewWidgetPlugin::stopAllRunControls()
|
||||
{
|
||||
QTC_ASSERT(s_previewPlugin, return);
|
||||
|
||||
@@ -109,7 +109,7 @@ void QmlPreviewPlugin::stopAllRunControls()
|
||||
|
||||
}
|
||||
|
||||
void QmlPreviewPlugin::handleRunningPreviews()
|
||||
void QmlPreviewWidgetPlugin::handleRunningPreviews()
|
||||
{
|
||||
QTC_ASSERT(s_previewPlugin, return);
|
||||
|
||||
@@ -124,12 +124,12 @@ void QmlPreviewPlugin::handleRunningPreviews()
|
||||
}
|
||||
}
|
||||
|
||||
QString QmlPreviewPlugin::metaInfo() const
|
||||
QString QmlPreviewWidgetPlugin::metaInfo() const
|
||||
{
|
||||
return QLatin1String(":/qmlpreviewplugin/qmlpreview.metainfo");
|
||||
}
|
||||
|
||||
void QmlPreviewPlugin::setQmlFile()
|
||||
void QmlPreviewWidgetPlugin::setQmlFile()
|
||||
{
|
||||
if (s_previewPlugin) {
|
||||
const Utils::FilePath qmlFileName =
|
||||
@@ -140,7 +140,7 @@ void QmlPreviewPlugin::setQmlFile()
|
||||
}
|
||||
}
|
||||
|
||||
float QmlPreviewPlugin::zoomFactor()
|
||||
float QmlPreviewWidgetPlugin::zoomFactor()
|
||||
{
|
||||
QVariant zoomFactorVariant = 1.0;
|
||||
if (s_previewPlugin && !s_previewPlugin->property("zoomFactor").isNull())
|
||||
@@ -148,7 +148,7 @@ float QmlPreviewPlugin::zoomFactor()
|
||||
return zoomFactorVariant.toFloat();
|
||||
}
|
||||
|
||||
void QmlPreviewPlugin::setZoomFactor(float zoomFactor)
|
||||
void QmlPreviewWidgetPlugin::setZoomFactor(float zoomFactor)
|
||||
{
|
||||
if (auto s_previewPlugin = getPreviewPlugin()) {
|
||||
bool hasZoomFactor = s_previewPlugin->setProperty("zoomFactor", zoomFactor);
|
||||
@@ -156,7 +156,7 @@ void QmlPreviewPlugin::setZoomFactor(float zoomFactor)
|
||||
}
|
||||
}
|
||||
|
||||
void QmlPreviewPlugin::setLanguageLocale(const QString &locale)
|
||||
void QmlPreviewWidgetPlugin::setLanguageLocale(const QString &locale)
|
||||
{
|
||||
if (auto s_previewPlugin = getPreviewPlugin()) {
|
||||
bool hasLocaleIsoCode = s_previewPlugin->setProperty("localeIsoCode", locale);
|
||||
@@ -164,7 +164,7 @@ void QmlPreviewPlugin::setLanguageLocale(const QString &locale)
|
||||
}
|
||||
}
|
||||
|
||||
QObject *QmlPreviewPlugin::getPreviewPlugin()
|
||||
QObject *QmlPreviewWidgetPlugin::getPreviewPlugin()
|
||||
{
|
||||
const QVector<ExtensionSystem::PluginSpec *> &specs = ExtensionSystem::PluginManager::plugins();
|
||||
const auto pluginIt = std::find_if(specs.cbegin(), specs.cend(),
|
||||
|
@@ -33,18 +33,18 @@ QT_FORWARD_DECLARE_CLASS(QAction)
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
class QmlPreviewPlugin : public QObject, QmlDesigner::IWidgetPlugin
|
||||
class QmlPreviewWidgetPlugin : public QObject, QmlDesigner::IWidgetPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QmlDesignerPlugin" FILE "qmlpreviewplugin.json")
|
||||
|
||||
Q_DISABLE_COPY(QmlPreviewPlugin)
|
||||
Q_DISABLE_COPY(QmlPreviewWidgetPlugin)
|
||||
Q_INTERFACES(QmlDesigner::IWidgetPlugin)
|
||||
|
||||
public:
|
||||
QmlPreviewPlugin();
|
||||
~QmlPreviewPlugin() override = default;
|
||||
QmlPreviewWidgetPlugin();
|
||||
~QmlPreviewWidgetPlugin() override = default;
|
||||
|
||||
QString metaInfo() const override;
|
||||
QString pluginName() const override;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
add_qtc_plugin(StudioPlugin
|
||||
PLUGIN_CLASS StudioPlugin
|
||||
CONDITION TARGET QmlDesigner
|
||||
DEPENDS Core QmlDesigner Utils ProjectExplorer
|
||||
SOURCES
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(QMLJSEDITOR_LIBRARY)
|
||||
# define QMLJSEDITOR_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(QMLJSEDITOR_STATIC_LIBRARY)
|
||||
# define QMLJSEDITOR_EXPORT
|
||||
#else
|
||||
# define QMLJSEDITOR_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
#if defined(QMLJSTOOLS_LIBRARY)
|
||||
# define QMLJSTOOLS_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(QMLJSTOOLS_STATIC)
|
||||
#elif defined(QMLJSTOOLS_STATIC_LIBRARY)
|
||||
# define QMLJSTOOLS_EXPORT
|
||||
#else
|
||||
# define QMLJSTOOLS_EXPORT Q_DECL_IMPORT
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(QMLPREVIEW_LIBRARY)
|
||||
# define QMLPREVIEW_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(QMLPREVIEW_STATIC_LIBRARY)
|
||||
# define QMLPREVIEW_EXPORT
|
||||
#else
|
||||
# define QMLPREVIEW_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(QMLPROFILER_LIBRARY)
|
||||
# define QMLPROFILER_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(QMLPROFILER_STATIC_LIBRARY)
|
||||
# define QMLPROFILER_EXPORT
|
||||
#else
|
||||
# define QMLPROFILER_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -1,4 +1,5 @@
|
||||
add_qtc_plugin(QmlProjectManager
|
||||
PLUGIN_CLASS QmlProjectPlugin
|
||||
DEPENDS QmlJS
|
||||
PLUGIN_DEPENDS Core ProjectExplorer QtSupport
|
||||
SOURCES
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(QMLPROJECTMANAGER_LIBRARY)
|
||||
# define QMLPROJECTMANAGER_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(QMLPROJECTMANAGER_STATIC_LIBRARY)
|
||||
# define QMLPROJECTMANAGER_EXPORT
|
||||
#else
|
||||
# define QMLPROJECTMANAGER_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(QTSUPPORT_LIBRARY)
|
||||
# define QTSUPPORT_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(QTSUPPORT_STATIC_LIBRARY)
|
||||
# define QTSUPPORT_EXPORT
|
||||
#else
|
||||
# define QTSUPPORT_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(REMOTELINUX_LIBRARY)
|
||||
# define REMOTELINUX_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(REMOTELINUX_STATIC_LIBRARY)
|
||||
# define REMOTELINUX_EXPORT
|
||||
#else
|
||||
# define REMOTELINUX_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -1,6 +1,5 @@
|
||||
add_qtc_plugin(ResourceEditor
|
||||
DEPENDS Qt5::Xml
|
||||
DEFINES RESOURCE_LIBRARY
|
||||
PLUGIN_DEPENDS Core ProjectExplorer
|
||||
SOURCES
|
||||
qrceditor/qrceditor.cpp qrceditor/qrceditor.h qrceditor/qrceditor.ui
|
||||
|
@@ -27,8 +27,10 @@
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
#if defined(RESOURCE_LIBRARY)
|
||||
#if defined(RESOURCEEDITOR_LIBRARY)
|
||||
# define RESOURCE_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(RESOURCEEDITOR_STATIC_LIBRARY)
|
||||
# define RESOURCE_EXPORT
|
||||
#else
|
||||
# define RESOURCE_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(TEXTEDITOR_LIBRARY)
|
||||
# define TEXTEDITOR_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(TEXTEDITOR_STATIC_LIBRARY)
|
||||
# define TEXTEDITOR_EXPORT
|
||||
#else
|
||||
# define TEXTEDITOR_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -56,7 +56,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
Q_LOGGING_CATEGORY(log, "qtc.updateinfo", QtWarningMsg)
|
||||
Q_LOGGING_CATEGORY(updateLog, "qtc.updateinfo", QtWarningMsg)
|
||||
|
||||
const char UpdaterGroup[] = "Updater";
|
||||
const char MaintenanceToolKey[] = "MaintenanceTool";
|
||||
@@ -274,22 +274,22 @@ void UpdateInfoPlugin::checkForUpdatesFinished()
|
||||
{
|
||||
setLastCheckDate(QDate::currentDate());
|
||||
|
||||
qCDebug(log) << "--- MaintenanceTool output (updates):";
|
||||
qCDebug(log) << qPrintable(d->m_updateOutput);
|
||||
qCDebug(log) << "--- MaintenanceTool output (packages):";
|
||||
qCDebug(log) << qPrintable(d->m_packagesOutput);
|
||||
qCDebug(updateLog) << "--- MaintenanceTool output (updates):";
|
||||
qCDebug(updateLog) << qPrintable(d->m_updateOutput);
|
||||
qCDebug(updateLog) << "--- MaintenanceTool output (packages):";
|
||||
qCDebug(updateLog) << qPrintable(d->m_packagesOutput);
|
||||
|
||||
stopCheckForUpdates();
|
||||
|
||||
const QList<Update> updates = availableUpdates(d->m_updateOutput);
|
||||
const QList<QtPackage> qtPackages = availableQtPackages(d->m_packagesOutput);
|
||||
if (log().isDebugEnabled()) {
|
||||
qCDebug(log) << "--- Available updates:";
|
||||
if (updateLog().isDebugEnabled()) {
|
||||
qCDebug(updateLog) << "--- Available updates:";
|
||||
for (const Update &u : updates)
|
||||
qCDebug(log) << u.name << u.version;
|
||||
qCDebug(log) << "--- Available Qt packages:";
|
||||
qCDebug(updateLog) << u.name << u.version;
|
||||
qCDebug(updateLog) << "--- Available Qt packages:";
|
||||
for (const QtPackage &p : qtPackages) {
|
||||
qCDebug(log) << p.displayName << p.version << "installed:" << p.installed
|
||||
qCDebug(updateLog) << p.displayName << p.version << "installed:" << p.installed
|
||||
<< "prerelease:" << p.isPrerelease;
|
||||
}
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#include <QRegularExpression>
|
||||
#include <QVersionNumber>
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(log)
|
||||
Q_DECLARE_LOGGING_CATEGORY(updateLog)
|
||||
|
||||
struct Update
|
||||
{
|
||||
@@ -133,8 +133,8 @@ Utils::optional<QtPackage> qtToNagAbout(const QList<QtPackage> &allPackages,
|
||||
if (packages.isEmpty())
|
||||
return {};
|
||||
const QtPackage highest = packages.constFirst();
|
||||
qCDebug(log) << "Highest available (non-prerelease) Qt:" << highest.version;
|
||||
qCDebug(log) << "Highest previously seen (non-prerelease) Qt:" << *highestSeen;
|
||||
qCDebug(updateLog) << "Highest available (non-prerelease) Qt:" << highest.version;
|
||||
qCDebug(updateLog) << "Highest previously seen (non-prerelease) Qt:" << *highestSeen;
|
||||
// if the highestSeen version is null, we don't know if the Qt version is new, and better don't nag
|
||||
const bool isNew = !highestSeen->isNull() && highest.version > *highestSeen;
|
||||
if (highestSeen->isNull() || isNew)
|
||||
@@ -142,7 +142,7 @@ Utils::optional<QtPackage> qtToNagAbout(const QList<QtPackage> &allPackages,
|
||||
if (!isNew)
|
||||
return {};
|
||||
const Utils::optional<QtPackage> highestInstalled = highestInstalledQt(packages);
|
||||
qCDebug(log) << "Highest installed Qt:"
|
||||
qCDebug(updateLog) << "Highest installed Qt:"
|
||||
<< qPrintable(highestInstalled ? highestInstalled->version.toString()
|
||||
: QString("none"));
|
||||
if (!highestInstalled) // don't nag if no Qt is installed at all
|
||||
|
@@ -1,4 +1,5 @@
|
||||
add_qtc_plugin(VcsBase
|
||||
PLUGIN_CLASS VcsPlugin
|
||||
PLUGIN_DEPENDS Core DiffEditor ProjectExplorer TextEditor
|
||||
PLUGIN_RECOMMENDS CodePaster CppEditor
|
||||
SOURCES
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#if defined(VCSBASE_LIBRARY)
|
||||
# define VCSBASE_EXPORT Q_DECL_EXPORT
|
||||
#elif defined(VCSBASE_STATIC_LIBRARY)
|
||||
# define VCSBASE_EXPORT
|
||||
#else
|
||||
# define VCSBASE_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
@@ -12,7 +12,7 @@ if (isMultiConfig)
|
||||
endif()
|
||||
|
||||
add_qtc_library(shared_help STATIC
|
||||
DEPENDS Utils PUBLIC Qt5::Help Qt5::PrintSupport Qt5::Widgets
|
||||
DEPENDS Utils Core PUBLIC Qt5::Help Qt5::PrintSupport Qt5::Widgets
|
||||
PUBLIC_INCLUDES
|
||||
"${PLUGIN_SOURCE_DIR}/help"
|
||||
"${PLUGIN_SOURCE_DIR}"
|
||||
|
@@ -2,7 +2,8 @@ add_qtc_library(clangbackend_lib STATIC
|
||||
DEPENDS libclang
|
||||
PUBLIC_DEPENDS
|
||||
Qt5::Widgets # FIXME: change the way to get the gui pch to linkto
|
||||
DEFINES
|
||||
PUBLIC_DEFINES
|
||||
$<TARGET_PROPERTY:ClangSupport,INTERFACE_COMPILE_DEFINITIONS>
|
||||
$<TARGET_PROPERTY:Sqlite,INTERFACE_COMPILE_DEFINITIONS>
|
||||
INCLUDES
|
||||
$<TARGET_PROPERTY:ClangSupport,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
|
@@ -3,7 +3,7 @@ set(UTILSDIR "${PROJECT_SOURCE_DIR}/src/libs/utils")
|
||||
add_qtc_executable(qtcreator_processlauncher
|
||||
INCLUDES "${UTILSDIR}"
|
||||
DEPENDS Qt5::Core Qt5::Network
|
||||
DEFINES QTCREATOR_UTILS_STATIC_LIB
|
||||
DEFINES UTILS_STATIC_LIBRARY
|
||||
SOURCES
|
||||
launcherlogging.cpp
|
||||
launcherlogging.h
|
||||
|
@@ -66,7 +66,7 @@ add_qtc_library(sdktoolLib
|
||||
|
||||
extend_qtc_library(sdktoolLib
|
||||
SOURCES_PREFIX "${UtilsSourcesDir}"
|
||||
PUBLIC_DEFINES QTCREATOR_UTILS_STATIC_LIB
|
||||
PUBLIC_DEFINES UTILS_STATIC_LIBRARY
|
||||
SOURCES
|
||||
commandline.cpp commandline.h
|
||||
environment.cpp environment.h
|
||||
@@ -109,7 +109,7 @@ add_qtc_executable(sdktool
|
||||
main.cpp
|
||||
)
|
||||
|
||||
if (MSVC AND TARGET sdktool)
|
||||
if (MSVC AND TARGET sdktool AND Qt5_VERSION VERSION_LESS 6.0.0)
|
||||
# find out if Qt is static and set /MT if so
|
||||
get_target_property(_input_type Qt5::Core TYPE)
|
||||
if (${_input_type} STREQUAL "STATIC_LIBRARY")
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <updateinfo/updateinfotools.h>
|
||||
|
||||
Q_LOGGING_CATEGORY(log, "qtc.updateinfo", QtWarningMsg)
|
||||
Q_LOGGING_CATEGORY(updateLog, "qtc.updateinfo", QtWarningMsg)
|
||||
|
||||
class tst_UpdateInfo : public QObject
|
||||
{
|
||||
|
@@ -152,7 +152,7 @@ if (NOT TARGET Sqlite)
|
||||
add_subdirectory(../../../src/libs/sqlite ${CMAKE_CURRENT_BINARY_DIR}/sqlite)
|
||||
endif()
|
||||
extend_qtc_test_with_target_sources(Sqlite
|
||||
DEFINES SQLITE_CUSTOM_INCLUDE=config.h
|
||||
DEFINES SQLITE_CUSTOM_INCLUDE=config.h SQLITE_STATIC_LIBRARY
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
@@ -258,7 +258,7 @@ extend_qtc_test(unittest
|
||||
"${QmlDesignerDir}/../../../share/qtcreator/qml/qmlpuppet/interfaces"
|
||||
"${QmlDesignerDir}/../../../share/qtcreator/qml/qmlpuppet/types"
|
||||
DEFINES
|
||||
QMLDESIGNER_TEST DESIGNER_STATIC_CORE_LIBRARY
|
||||
QMLDESIGNER_TEST QMLDESIGNER_STATIC_LIBRARY
|
||||
SOURCES_PREFIX
|
||||
"${QmlDesignerDir}"
|
||||
SOURCES
|
||||
|
Reference in New Issue
Block a user