CMake build: Add ability to disable building of individual plugins

Adds a cache entry "BUILD_PLUGIN_${NAME}", defaulting to ON which
can be set to OFF to disable building of a plugin.

Adds a extend_qtc_plugin function that should be used to add
properties to a plugin after add_qtc_plugin, instead of the
standard CMake functions target_... . The new function results
in a no-op if the plugin was disabled.

Change-Id: I57f6799620aea0aaa8b56acead4815ccced95911
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Eike Ziller
2019-05-21 12:22:35 +02:00
parent 9645687e53
commit 6fb9bf453f
23 changed files with 663 additions and 545 deletions

View File

@@ -62,6 +62,31 @@ function(set_explicit_moc target_name file)
target_sources(${target_name} PRIVATE "${file_moc}") target_sources(${target_name} PRIVATE "${file_moc}")
endfunction() endfunction()
function(add_qtc_depends target_name)
cmake_parse_arguments(_arg "" "" "PRIVATE;PUBLIC" ${ARGN})
if (${_arg_UNPARSED_ARGUMENTS})
message(FATAL_ERROR "add_qtc_depends had unparsed arguments")
endif()
separate_object_libraries("${_arg_PRIVATE}"
depends object_lib_depends object_lib_depends_objects)
separate_object_libraries("${_arg_PUBLIC}"
public_depends object_public_depends object_public_depends_objects)
target_sources(${target_name} PRIVATE ${object_lib_depends_objects} ${object_public_depends_objects})
target_link_libraries(${target_name} PRIVATE ${depends} PUBLIC ${public_depends})
foreach(obj_lib IN LISTS object_lib_depends)
target_compile_definitions(${target_name} PRIVATE $<TARGET_PROPERTY:${obj_lib},INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(${target_name} PRIVATE $<TARGET_PROPERTY:${obj_lib},INTERFACE_INCLUDE_DIRECTORIES>)
endforeach()
foreach(obj_lib IN LISTS object_public_depends)
target_compile_definitions(${target_name} PUBLIC $<TARGET_PROPERTY:${obj_lib},INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(${target_name} PUBLIC $<TARGET_PROPERTY:${obj_lib},INTERFACE_INCLUDE_DIRECTORIES>)
endforeach()
endfunction()
function(add_qtc_library name) function(add_qtc_library name)
cmake_parse_arguments(_arg "STATIC;OBJECT" "" cmake_parse_arguments(_arg "STATIC;OBJECT" ""
"DEFINES;DEPENDS;INCLUDES;PUBLIC_DEFINES;PUBLIC_DEPENDS;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;PROPERTIES" ${ARGN} "DEFINES;DEPENDS;INCLUDES;PUBLIC_DEFINES;PUBLIC_DEPENDS;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;PROPERTIES" ${ARGN}
@@ -179,6 +204,11 @@ function(find_dependent_plugins varName)
set("${varName}" ${_RESULT} PARENT_SCOPE) set("${varName}" ${_RESULT} PARENT_SCOPE)
endfunction() endfunction()
function(qtc_plugin_enabled varName name)
string(TOUPPER "BUILD_PLUGIN_${name}" _build_plugin_var)
set(${varName} ${${_build_plugin_var}} PARENT_SCOPE)
endfunction()
function(add_qtc_plugin target_name) function(add_qtc_plugin target_name)
cmake_parse_arguments(_arg cmake_parse_arguments(_arg
"EXPERIMENTAL;SKIP_DEBUG_CMAKE_FILE_CHECK" "EXPERIMENTAL;SKIP_DEBUG_CMAKE_FILE_CHECK"
@@ -204,7 +234,10 @@ function(add_qtc_plugin target_name)
set(_extra_text "with CONDITION ${_contents}") set(_extra_text "with CONDITION ${_contents}")
endif() endif()
if (${_arg_CONDITION}) string(TOUPPER "BUILD_PLUGIN_${target_name}" _build_plugin_var)
set(${_build_plugin_var} "ON" CACHE BOOL "Build plugin ${name}.")
if ((${_arg_CONDITION}) AND ${_build_plugin_var})
set(_plugin_enabled ON) set(_plugin_enabled ON)
else() else()
set(_plugin_enabled OFF) set(_plugin_enabled OFF)
@@ -273,13 +306,7 @@ function(add_qtc_plugin target_name)
configure_file("${CMAKE_CURRENT_BINARY_DIR}/${name}.json.cmakein" "${name}.json") configure_file("${CMAKE_CURRENT_BINARY_DIR}/${name}.json.cmakein" "${name}.json")
endif() endif()
separate_object_libraries("${_arg_DEPENDS}" add_library(${target_name} SHARED ${_arg_SOURCES})
depends object_lib_depends object_lib_depends_objects)
separate_object_libraries("${_arg_PUBLIC_DEPENDS}"
public_depends object_public_depends object_public_depends_objects)
add_library(${target_name} SHARED ${_arg_SOURCES}
${object_lib_depends_objects} ${object_public_depends_objects})
### Generate EXPORT_SYMBOL ### Generate EXPORT_SYMBOL
string(TOUPPER "${name}_LIBRARY" EXPORT_SYMBOL) string(TOUPPER "${name}_LIBRARY" EXPORT_SYMBOL)
@@ -288,10 +315,7 @@ function(add_qtc_plugin target_name)
set(TEST_DEFINES WITH_TESTS SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}") set(TEST_DEFINES WITH_TESTS SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
endif() endif()
target_link_libraries(${target_name} target_link_libraries(${target_name} PRIVATE ${_DEP_PLUGINS} ${_TEST_DEPENDS})
PRIVATE ${_DEP_PLUGINS} ${depends} ${_TEST_DEPENDS}
PUBLIC ${public_depends}
)
target_include_directories(${target_name} target_include_directories(${target_name}
PRIVATE ${_arg_INCLUDES} "${CMAKE_CURRENT_SOURCE_DIR}/.." "${CMAKE_CURRENT_BINARY_DIR}" PRIVATE ${_arg_INCLUDES} "${CMAKE_CURRENT_SOURCE_DIR}/.." "${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_BINARY_DIR}/src" "${CMAKE_BINARY_DIR}/src"
@@ -301,14 +325,10 @@ function(add_qtc_plugin target_name)
PRIVATE ${EXPORT_SYMBOL} ${DEFAULT_DEFINES} ${_arg_DEFINES} ${TEST_DEFINES} PRIVATE ${EXPORT_SYMBOL} ${DEFAULT_DEFINES} ${_arg_DEFINES} ${TEST_DEFINES}
) )
foreach(obj_lib IN LISTS object_lib_depends) add_qtc_depends(${target_name}
target_compile_definitions(${target_name} PRIVATE $<TARGET_PROPERTY:${obj_lib},INTERFACE_COMPILE_DEFINITIONS>) PRIVATE ${_arg_DEPENDS}
target_include_directories(${target_name} PRIVATE $<TARGET_PROPERTY:${obj_lib},INTERFACE_INCLUDE_DIRECTORIES>) PUBLIC ${_arg_PUBLIC_DEPENDS}
endforeach() )
foreach(obj_lib IN LISTS object_public_depends)
target_compile_definitions(${target_name} PUBLIC $<TARGET_PROPERTY:${obj_lib},INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(${target_name} PUBLIC $<TARGET_PROPERTY:${obj_lib},INTERFACE_INCLUDE_DIRECTORIES>)
endforeach()
set(plugin_dir "${IDE_PLUGIN_PATH}") set(plugin_dir "${IDE_PLUGIN_PATH}")
if (_arg_PLUGIN_PATH) if (_arg_PLUGIN_PATH)
@@ -340,6 +360,44 @@ function(add_qtc_plugin target_name)
) )
endfunction() endfunction()
function(extend_qtc_plugin target_name)
cmake_parse_arguments(_arg
""
"SOURCES_PREFIX"
"CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;INCLUDES;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC"
${ARGN}
)
if (${_arg_UNPARSED_ARGUMENTS})
message(FATAL_ERROR "extend_qtc_plugin had unparsed arguments")
endif()
qtc_plugin_enabled(_plugin_enabled ${target_name})
if (NOT _arg_CONDITION)
set(_arg_CONDITION ON)
endif()
if ((NOT (${_arg_CONDITION})) OR (NOT _plugin_enabled))
return()
endif()
add_qtc_depends(${target_name}
PRIVATE ${_arg_DEPENDS}
PUBLIC ${_arg_PUBLIC_DEPENDS}
)
target_compile_definitions(${target_name} PRIVATE ${_arg_DEFINES})
target_include_directories(${target_name} PRIVATE ${_arg_INCLUDES} PUBLIC ${_arg_PUBLIC_INCLUDES})
if (_arg_SOURCES_PREFIX)
list(TRANSFORM _arg_SOURCES PREPEND "${_arg_SOURCES_PREFIX}/")
target_include_directories(${target_name} PUBLIC "${_arg_SOURCES_PREFIX}")
endif()
target_sources(${target_name} PRIVATE ${_arg_SOURCES})
foreach(file IN LISTS _arg_EXPLICIT_MOC)
set_explicit_moc(${target_name} "${file}")
endforeach()
endfunction()
function(add_qtc_executable name) function(add_qtc_executable name)
cmake_parse_arguments(_arg "" "DESTINATION" "DEFINES;DEPENDS;INCLUDES;SOURCES;PROPERTIES" ${ARGN}) cmake_parse_arguments(_arg "" "DESTINATION" "DEFINES;DEPENDS;INCLUDES;SOURCES;PROPERTIES" ${ARGN})

View File

@@ -74,8 +74,7 @@ add_qtc_plugin(AutoTest
EXPLICIT_MOC boost/boosttestsettingspage.h EXPLICIT_MOC boost/boosttestsettingspage.h
) )
if (WITH_TESTS) extend_qtc_plugin(AutoTest
target_sources(AutoTest PRIVATE CONDITION WITH_TESTS
autotestunittests.cpp autotestunittests.h SOURCES autotestunittests.cpp autotestunittests.h
) )
endif()

View File

@@ -47,11 +47,11 @@ add_qtc_plugin(ClangCodeModel
EXPLICIT_MOC clangcodemodelplugin.h EXPLICIT_MOC clangcodemodelplugin.h
) )
if (WITH_TESTS) extend_qtc_plugin(ClangCodeModel
target_sources(ClangCodeModel PRIVATE CONDITION WITH_TESTS
SOURCES
test/clangautomationutils.cpp test/clangautomationutils.h test/clangautomationutils.cpp test/clangautomationutils.h
test/clangbatchfileprocessor.cpp test/clangbatchfileprocessor.h test/clangbatchfileprocessor.cpp test/clangbatchfileprocessor.h
test/clangcodecompletion_test.cpp test/clangcodecompletion_test.h test/clangcodecompletion_test.cpp test/clangcodecompletion_test.h
test/data/clangtestdata.qrc test/data/clangtestdata.qrc
) )
endif()

View File

@@ -32,10 +32,10 @@ add_qtc_plugin(ClangTools
clangtoolsutils.cpp clangtoolsutils.h clangtoolsutils.cpp clangtoolsutils.h
) )
if (WITH_TESTS) extend_qtc_plugin(ClangTools
target_sources(ClangTools PRIVATE CONDITION WITH_TESTS
SOURCES
clangtoolspreconfiguredsessiontests.cpp clangtoolspreconfiguredsessiontests.h clangtoolspreconfiguredsessiontests.cpp clangtoolspreconfiguredsessiontests.h
clangtoolsunittests.cpp clangtoolsunittests.h clangtoolsunittests.cpp clangtoolsunittests.h
clangtoolsunittests.qrc clangtoolsunittests.qrc
) )
endif()

View File

@@ -9,8 +9,7 @@ add_qtc_plugin(CompilationDatabaseProjectManager
compilationdatabaseutils.cpp compilationdatabaseutils.h compilationdatabaseutils.cpp compilationdatabaseutils.h
) )
if (WITH_TESTS) extend_qtc_plugin(CompilationDatabaseProjectManager
target_sources(CompilationDatabaseProjectManager PRIVATE CONDITION WITH_TESTS
compilationdatabasetests.cpp compilationdatabasetests.h SOURCES compilationdatabasetests.cpp compilationdatabasetests.h
) )
endif()

View File

@@ -151,22 +151,29 @@ add_qtc_plugin(Core
EXPLICIT_MOC dialogs/filepropertiesdialog.h EXPLICIT_MOC dialogs/filepropertiesdialog.h
) )
if (WITH_TESTS) extend_qtc_plugin(Core
target_sources(Core PRIVATE CONDITION WITH_TESTS
SOURCES
locator/locator_test.cpp locator/locator_test.cpp
locator/locatorfiltertest.cpp locator/locatorfiltertest.h locator/locatorfiltertest.cpp locator/locatorfiltertest.h
testdatadir.cpp testdatadir.h testdatadir.cpp testdatadir.h
) )
endif()
if (WIN32) extend_qtc_plugin(Core
target_sources(Core PRIVATE progressmanager/progressmanager_win.cpp) CONDITION WIN32
elseif (APPLE) SOURCES progressmanager/progressmanager_win.cpp
find_library(FWAppKit AppKit) )
target_link_libraries(Core PRIVATE ${FWAppKit})
target_sources(Core PRIVATE find_library(FWAppKit AppKit)
extend_qtc_plugin(Core
CONDITION APPLE AND FWAppKit
DEPENDS ${FWAppKit}
SOURCES
progressmanager/progressmanager_mac.mm progressmanager/progressmanager_mac.mm
locator/spotlightlocatorfilter.h locator/spotlightlocatorfilter.mm) locator/spotlightlocatorfilter.h locator/spotlightlocatorfilter.mm
else() )
target_sources(Core PRIVATE progressmanager/progressmanager_x11.cpp)
endif() extend_qtc_plugin(Core
CONDITION (NOT WIN32) AND (NOT APPLE)
SOURCES progressmanager/progressmanager_x11.cpp
)

View File

@@ -31,8 +31,9 @@ add_qtc_plugin(CppEditor
EXPLICIT_MOC cppeditor.h EXPLICIT_MOC cppeditor.h
) )
if (WITH_TESTS) extend_qtc_plugin(CppEditor
target_sources(CppEditor PRIVATE CONDITION WITH_TESTS
SOURCES
cppdoxygen_test.cpp cppdoxygen_test.h cppdoxygen_test.cpp cppdoxygen_test.h
cppeditortestcase.cpp cppeditortestcase.h cppeditortestcase.cpp cppeditortestcase.h
cppincludehierarchy_test.cpp cppincludehierarchy_test.cpp
@@ -40,7 +41,7 @@ if (WITH_TESTS)
cppuseselections_test.cpp cppuseselections_test.cpp
fileandtokenactions_test.cpp fileandtokenactions_test.cpp
followsymbol_switchmethoddecldef_test.cpp followsymbol_switchmethoddecldef_test.cpp
) EXPLICIT_MOC
set_explicit_moc(CppEditor cppdoxygen_test.h) cppdoxygen_test.h
set_explicit_moc(CppEditor cppquickfix_test.h) cppquickfix_test.h
endif() )

View File

@@ -112,8 +112,9 @@ add_qtc_plugin(CppTools
wrappablelineedit.cpp wrappablelineedit.h wrappablelineedit.cpp wrappablelineedit.h
) )
if (WITH_TESTS) extend_qtc_plugin(CppTools
target_sources(CppTools PRIVATE CONDITION WITH_TESTS
SOURCES
cppcodegen_test.cpp cppcodegen_test.cpp
cppcompletion_test.cpp cppcompletion_test.cpp
cppheadersource_test.cpp cppheadersource_test.cpp
@@ -127,5 +128,4 @@ if (WITH_TESTS)
modelmanagertesthelper.cpp modelmanagertesthelper.h modelmanagertesthelper.cpp modelmanagertesthelper.h
symbolsearcher_test.cpp symbolsearcher_test.cpp
typehierarchybuilder_test.cpp typehierarchybuilder_test.cpp
) )
endif()

View File

@@ -95,16 +95,15 @@ add_qtc_plugin(Debugger
watchwindow.cpp watchwindow.h watchwindow.cpp watchwindow.h
) )
if (WIN32) extend_qtc_plugin(Debugger
target_sources(Debugger PRIVATE CONDITION WIN32
registerpostmortemaction.cpp registerpostmortemaction.h SOURCES registerpostmortemaction.cpp registerpostmortemaction.h
) DEFINES UNICODE _UNICODE
target_compile_definitions(Debugger PRIVATE UNICODE _UNICODE) )
endif()
if (WITH_TESTS) extend_qtc_plugin(Debugger
target_sources(Debugger PRIVATE CONDITION WITH_TESTS
SOURCES
debuggerunittests.qrc debuggerunittests.qrc
unit-tests/simple/main.cpp unit-tests/simple/main.cpp
) )
endif()

View File

@@ -36,6 +36,7 @@ add_qtc_plugin(Designer
settingspage.cpp settingspage.h settingspage.cpp settingspage.h
) )
if (WITH_TESTS) extend_qtc_plugin(Designer
target_sources(Designer PRIVATE gotoslot_test.cpp) CONDITION WITH_TESTS AND TARGET Qt5::DesignerComponents AND TARGET Qt5::Designer
endif() SOURCES gotoslot_test.cpp
)

View File

@@ -13,6 +13,7 @@ add_qtc_plugin(FakeVim
fakevimtr.h fakevimtr.h
) )
if (WITH_TESTS) extend_qtc_plugin(FakeVim
target_sources(FakeVim PRIVATE fakevim_test.cpp) CONDITION WITH_TESTS
endif() SOURCES fakevim_test.cpp
)

View File

@@ -16,6 +16,7 @@ add_qtc_plugin(GenericProjectManager
genericprojectwizard.cpp genericprojectwizard.h genericprojectwizard.cpp genericprojectwizard.h
) )
if (WITH_TESTS) extend_qtc_plugin(GenericProjectManager
target_sources(GenericProjectManager PRIVATE genericprojectplugin_test.cpp) CONDITION WITH_TESTS
endif() SOURCES genericprojectplugin_test.cpp
)

View File

@@ -29,17 +29,22 @@ add_qtc_plugin(Help
xbelsupport.cpp xbelsupport.h xbelsupport.cpp xbelsupport.h
) )
if (APPLE) find_library(FWWebKit WebKit)
find_library(FWWebKit WebKit) find_library(FWAppKit AppKit)
find_library(FWAppKit AppKit) extend_qtc_plugin(Help
target_link_libraries(Help PRIVATE ${FWWebKit} ${FWAppKit}) CONDITION APPLE AND FWWebKit AND FWAppKit
target_compile_definitions(Help PRIVATE QTC_MAC_NATIVE_HELPVIEWER) DEPENDS ${FWWebKit} ${FWAppKit}
target_sources(Help PRIVATE macwebkithelpviewer.h macwebkithelpviewer.mm) DEFINES QTC_MAC_NATIVE_HELPVIEWER
endif() SOURCES
macwebkithelpviewer.h
macwebkithelpviewer.mm
)
find_package(Qt5WebEngineWidgets QUIET) find_package(Qt5WebEngineWidgets QUIET)
extend_qtc_plugin(Help
if (TARGET Qt5::WebEngineWidgets) CONDITION TARGET Qt5::WebEngineWidgets
target_sources(Help PRIVATE webenginehelpviewer.cpp webenginehelpviewer.h) DEPENDS Qt5::WebEngineWidgets
target_link_libraries(Help PRIVATE Qt5::WebEngineWidgets) SOURCES
endif() webenginehelpviewer.cpp
webenginehelpviewer.h
)

View File

@@ -26,8 +26,9 @@ add_qtc_plugin(Ios
simulatoroperationdialog.cpp simulatoroperationdialog.h simulatoroperationdialog.ui simulatoroperationdialog.cpp simulatoroperationdialog.h simulatoroperationdialog.ui
) )
if (APPLE) find_library(FWCoreFoundation CoreFoundation)
find_library(FWCoreFoundation CoreFoundation) find_library(FWIOKit IOKit)
find_library(FWIOKit IOKit) extend_qtc_plugin(Ios
target_link_libraries(Ios PRIVATE ${FWCoreFoundation} ${FWIOKit}) CONDITION APPLE AND FWCoreFoundation AND FWIOKit
endif() DEPENDS ${FWCoreFoundation} ${FWIOKit}
)

View File

@@ -32,10 +32,10 @@ add_qtc_plugin(PerfProfiler
perftracepointdialog.cpp perftracepointdialog.h perftracepointdialog.ui perftracepointdialog.cpp perftracepointdialog.h perftracepointdialog.ui
) )
if (WITH_TESTS) extend_qtc_plugin(PerfProfiler
target_sources(PerfProfiler PRIVATE CONDITION WITH_TESTS
SOURCES
tests/perfprofilertracefile_test.cpp tests/perfprofilertracefile_test.h tests/perfprofilertracefile_test.cpp tests/perfprofilertracefile_test.h
tests/perfresourcecounter_test.cpp tests/perfresourcecounter_test.h tests/perfresourcecounter_test.cpp tests/perfresourcecounter_test.h
tests/tests.qrc tests/tests.qrc
) )
endif()

View File

@@ -183,26 +183,31 @@ add_qtc_plugin(ProjectExplorer
if (TARGET libclang) if (TARGET libclang)
set(CLANG_BINDIR "$<TARGET_FILE_DIR:libclang>") set(CLANG_BINDIR "$<TARGET_FILE_DIR:libclang>")
endif() endif()
target_compile_definitions(ProjectExplorer PRIVATE CLANG_BINDIR="${CLANG_BINDIR}") extend_qtc_plugin(ProjectExplorer
DEFINES "CLANG_BINDIR=\"${CLANG_BINDIR}\""
)
if (WIN32) extend_qtc_plugin(ProjectExplorer
target_sources(ProjectExplorer PRIVATE CONDITION WIN32
windebuginterface.cpp windebuginterface.h) SOURCES windebuginterface.cpp windebuginterface.h
target_compile_definitions(ProjectExplorer PRIVATE UNICODE _UNICODE) DEFINES UNICODE _UNICODE
endif() )
if (journald) extend_qtc_plugin(ProjectExplorer
target_sources(ProjectExplorer PRIVATE CONDITION journald
journaldwatcher.cpp journaldwatcher.h) DEPENDS systemd
target_compile_definitions(ProjectExplorer PRIVATE WITH_JOURNALD) SOURCES journaldwatcher.cpp journaldwatcher.h
target_link_libraries(ProjectExplorer PRIVATE systemd) DEFINES WITH_JOURNALD
endif() )
if (WITH_TESTS) extend_qtc_plugin(ProjectExplorer
target_sources(ProjectExplorer PRIVATE CONDITION WITH_TESTS
SOURCES
jsonwizard/jsonwizard_test.cpp jsonwizard/jsonwizard_test.cpp
outputparser_test.cpp outputparser_test.h outputparser_test.cpp outputparser_test.h
) )
qtc_plugin_enabled(_projectexplorer_enabled ProjectExplorer)
if (WITH_TESTS AND _projectexplorer_enabled)
set_source_files_properties(jsonwizard/jsonwizard_test.cpp set_source_files_properties(jsonwizard/jsonwizard_test.cpp
PROPERTIES HEADER_FILE_ONLY ON PROPERTIES HEADER_FILE_ONLY ON
) )

View File

@@ -35,6 +35,7 @@ if (APPLE)
endif() endif()
add_qtc_plugin(componentsplugin add_qtc_plugin(componentsplugin
CONDITION TARGET QmlDesigner
DEPENDS Core QmlDesigner Utils Qt5::Qml DEPENDS Core QmlDesigner Utils Qt5::Qml
DEFINES COMPONENTS_LIBRARY DEFINES COMPONENTS_LIBRARY
INCLUDES ${CMAKE_CURRENT_LIST_DIR}/designercore/include INCLUDES ${CMAKE_CURRENT_LIST_DIR}/designercore/include
@@ -51,6 +52,7 @@ add_qtc_plugin(componentsplugin
) )
add_qtc_plugin(qtquickplugin add_qtc_plugin(qtquickplugin
CONDITION TARGET QmlDesigner
DEPENDS Core QmlDesigner Utils Qt5::Qml DEPENDS Core QmlDesigner Utils Qt5::Qml
DEFINES QTQUICK_LIBRARY DEFINES QTQUICK_LIBRARY
INCLUDES ${CMAKE_CURRENT_LIST_DIR}/designercore/include INCLUDES ${CMAKE_CURRENT_LIST_DIR}/designercore/include
@@ -61,465 +63,501 @@ add_qtc_plugin(qtquickplugin
SKIP_DEBUG_CMAKE_FILE_CHECK SKIP_DEBUG_CMAKE_FILE_CHECK
) )
function(extend_qtc_plugin name directory) extend_qtc_plugin(QmlDesigner
foreach(source ${ARGN}) SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/container
list(APPEND source_list ${directory}/${source}) SOURCES
endforeach() addimportcontainer.cpp addimportcontainer.h
target_sources(${name} PRIVATE ${source_list}) idcontainer.cpp idcontainer.h
target_include_directories(${name} PUBLIC ${directory}) imagecontainer.cpp imagecontainer.h
endfunction(extend_qtc_plugin) informationcontainer.cpp informationcontainer.h
instancecontainer.cpp instancecontainer.h
extend_qtc_plugin(QmlDesigner ../../../share/qtcreator/qml/qmlpuppet/container mockuptypecontainer.cpp mockuptypecontainer.h
addimportcontainer.cpp addimportcontainer.h propertyabstractcontainer.cpp propertyabstractcontainer.h
idcontainer.cpp idcontainer.h propertybindingcontainer.cpp propertybindingcontainer.h
imagecontainer.cpp imagecontainer.h propertyvaluecontainer.cpp propertyvaluecontainer.h
informationcontainer.cpp informationcontainer.h reparentcontainer.cpp reparentcontainer.h
instancecontainer.cpp instancecontainer.h sharedmemory.h
mockuptypecontainer.cpp mockuptypecontainer.h
propertyabstractcontainer.cpp propertyabstractcontainer.h
propertybindingcontainer.cpp propertybindingcontainer.h
propertyvaluecontainer.cpp propertyvaluecontainer.h
reparentcontainer.cpp reparentcontainer.h
sharedmemory.h
) )
if (UNIX) if (UNIX)
extend_qtc_plugin(QmlDesigner ../../../share/qtcreator/qml/qmlpuppet/container extend_qtc_plugin(QmlDesigner
sharedmemory_unix.cpp SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/container
SOURCES sharedmemory_unix.cpp
) )
if (NOT APPLE) if (NOT APPLE)
target_link_libraries(QmlDesigner PRIVATE rt) extend_qtc_plugin(QmlDesigner DEPENDS rt)
endif() endif()
else() else()
extend_qtc_plugin(QmlDesigner ../../../share/qtcreator/qml/qmlpuppet/container extend_qtc_plugin(QmlDesigner
sharedmemory_qt.cpp SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/container
SOURCES sharedmemory_qt.cpp
) )
endif() endif()
extend_qtc_plugin(QmlDesigner ../../../share/qtcreator/qml/qmlpuppet/commands extend_qtc_plugin(QmlDesigner
changeauxiliarycommand.cpp changeauxiliarycommand.h SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/commands
changebindingscommand.cpp changebindingscommand.h SOURCES
changefileurlcommand.cpp changefileurlcommand.h changeauxiliarycommand.cpp changeauxiliarycommand.h
changeidscommand.cpp changeidscommand.h changebindingscommand.cpp changebindingscommand.h
changenodesourcecommand.cpp changenodesourcecommand.h changefileurlcommand.cpp changefileurlcommand.h
changestatecommand.cpp changestatecommand.h changeidscommand.cpp changeidscommand.h
changevaluescommand.cpp changevaluescommand.h changenodesourcecommand.cpp changenodesourcecommand.h
childrenchangedcommand.cpp childrenchangedcommand.h changestatecommand.cpp changestatecommand.h
clearscenecommand.cpp clearscenecommand.h changevaluescommand.cpp changevaluescommand.h
completecomponentcommand.cpp completecomponentcommand.h childrenchangedcommand.cpp childrenchangedcommand.h
componentcompletedcommand.cpp componentcompletedcommand.h clearscenecommand.cpp clearscenecommand.h
createinstancescommand.cpp createinstancescommand.h completecomponentcommand.cpp completecomponentcommand.h
createscenecommand.cpp createscenecommand.h componentcompletedcommand.cpp componentcompletedcommand.h
debugoutputcommand.cpp debugoutputcommand.h createinstancescommand.cpp createinstancescommand.h
endpuppetcommand.cpp endpuppetcommand.h createscenecommand.cpp createscenecommand.h
informationchangedcommand.cpp informationchangedcommand.h debugoutputcommand.cpp debugoutputcommand.h
pixmapchangedcommand.cpp pixmapchangedcommand.h endpuppetcommand.cpp endpuppetcommand.h
puppetalivecommand.cpp puppetalivecommand.h informationchangedcommand.cpp informationchangedcommand.h
removeinstancescommand.cpp removeinstancescommand.h pixmapchangedcommand.cpp pixmapchangedcommand.h
removepropertiescommand.cpp removepropertiescommand.h puppetalivecommand.cpp puppetalivecommand.h
removesharedmemorycommand.cpp removesharedmemorycommand.h removeinstancescommand.cpp removeinstancescommand.h
reparentinstancescommand.cpp reparentinstancescommand.h removepropertiescommand.cpp removepropertiescommand.h
statepreviewimagechangedcommand.cpp statepreviewimagechangedcommand.h removesharedmemorycommand.cpp removesharedmemorycommand.h
synchronizecommand.cpp synchronizecommand.h reparentinstancescommand.cpp reparentinstancescommand.h
tokencommand.cpp tokencommand.h statepreviewimagechangedcommand.cpp statepreviewimagechangedcommand.h
valueschangedcommand.cpp valueschangedcommand.h synchronizecommand.cpp synchronizecommand.h
tokencommand.cpp tokencommand.h
valueschangedcommand.cpp valueschangedcommand.h
) )
extend_qtc_plugin(QmlDesigner ../../../share/qtcreator/qml/qmlpuppet/interfaces extend_qtc_plugin(QmlDesigner
nodeinstanceserverinterface.cpp SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/interfaces
commondefines.h SOURCES
nodeinstanceclientinterface.h nodeinstanceserverinterface.cpp
nodeinstanceglobal.h commondefines.h
nodeinstanceserverinterface.h nodeinstanceclientinterface.h
nodeinstanceglobal.h
nodeinstanceserverinterface.h
) )
extend_qtc_plugin(QmlDesigner ../../../share/qtcreator/qml/qmlpuppet/types extend_qtc_plugin(QmlDesigner
enumeration.cpp enumeration.h SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/types
SOURCES enumeration.cpp enumeration.h
) )
extend_qtc_plugin(QmlDesigner components/componentcore extend_qtc_plugin(QmlDesigner
abstractaction.cpp abstractaction.h SOURCES_PREFIX components/componentcore
abstractactiongroup.cpp abstractactiongroup.h PUBLIC_INCLUDES components/componentcore
actioninterface.h SOURCES
addimagesdialog.cpp addimagesdialog.h abstractaction.cpp abstractaction.h
addsignalhandlerdialog.cpp addsignalhandlerdialog.h addsignalhandlerdialog.ui abstractactiongroup.cpp abstractactiongroup.h
changestyleaction.cpp changestyleaction.h actioninterface.h
componentcore.qrc addimagesdialog.cpp addimagesdialog.h
componentcore_constants.h addsignalhandlerdialog.cpp addsignalhandlerdialog.h addsignalhandlerdialog.ui
crumblebar.cpp crumblebar.h changestyleaction.cpp changestyleaction.h
designeractionmanager.cpp designeractionmanager.h componentcore.qrc
designeractionmanagerview.cpp designeractionmanagerview.h componentcore_constants.h
findimplementation.cpp findimplementation.h crumblebar.cpp crumblebar.h
layoutingridlayout.cpp layoutingridlayout.h designeractionmanager.cpp designeractionmanager.h
modelnodecontextmenu.cpp modelnodecontextmenu.h designeractionmanagerview.cpp designeractionmanagerview.h
modelnodecontextmenu_helper.cpp modelnodecontextmenu_helper.h findimplementation.cpp findimplementation.h
modelnodeoperations.cpp modelnodeoperations.h layoutingridlayout.cpp layoutingridlayout.h
qmldesignericonprovider.cpp qmldesignericonprovider.h modelnodecontextmenu.cpp modelnodecontextmenu.h
selectioncontext.cpp selectioncontext.h modelnodecontextmenu_helper.cpp modelnodecontextmenu_helper.h
theme.cpp theme.h modelnodeoperations.cpp modelnodeoperations.h
zoomaction.cpp zoomaction.h qmldesignericonprovider.cpp qmldesignericonprovider.h
selectioncontext.cpp selectioncontext.h
theme.cpp theme.h
zoomaction.cpp zoomaction.h
) )
extend_qtc_plugin(QmlDesigner components/debugview extend_qtc_plugin(QmlDesigner
debugview.cpp debugview.h SOURCES_PREFIX components/debugview
debugviewwidget.cpp debugviewwidget.h debugviewwidget.ui SOURCES
debugview.cpp debugview.h
debugviewwidget.cpp debugviewwidget.h debugviewwidget.ui
) )
extend_qtc_plugin(QmlDesigner components/formeditor extend_qtc_plugin(QmlDesigner
abstractcustomtool.cpp abstractcustomtool.h SOURCES_PREFIX components/formeditor
abstractformeditortool.cpp abstractformeditortool.h SOURCES
anchorindicator.cpp anchorindicator.h abstractcustomtool.cpp abstractcustomtool.h
anchorindicatorgraphicsitem.cpp anchorindicatorgraphicsitem.h abstractformeditortool.cpp abstractformeditortool.h
backgroundaction.cpp backgroundaction.h anchorindicator.cpp anchorindicator.h
bindingindicator.cpp bindingindicator.h anchorindicatorgraphicsitem.cpp anchorindicatorgraphicsitem.h
bindingindicatorgraphicsitem.cpp bindingindicatorgraphicsitem.h backgroundaction.cpp backgroundaction.h
contentnoteditableindicator.cpp contentnoteditableindicator.h bindingindicator.cpp bindingindicator.h
controlelement.cpp controlelement.h bindingindicatorgraphicsitem.cpp bindingindicatorgraphicsitem.h
dragtool.cpp dragtool.h contentnoteditableindicator.cpp contentnoteditableindicator.h
formeditor.qrc controlelement.cpp controlelement.h
formeditorgraphicsview.cpp formeditorgraphicsview.h dragtool.cpp dragtool.h
formeditoritem.cpp formeditoritem.h formeditor.qrc
formeditorscene.cpp formeditorscene.h formeditorgraphicsview.cpp formeditorgraphicsview.h
formeditorsubwindow.h formeditoritem.cpp formeditoritem.h
formeditortoolbutton.cpp formeditortoolbutton.h formeditorscene.cpp formeditorscene.h
formeditorview.cpp formeditorview.h formeditorsubwindow.h
formeditorwidget.cpp formeditorwidget.h formeditortoolbutton.cpp formeditortoolbutton.h
itemutilfunctions.cpp itemutilfunctions.h formeditorview.cpp formeditorview.h
layeritem.cpp layeritem.h formeditorwidget.cpp formeditorwidget.h
lineeditaction.cpp lineeditaction.h itemutilfunctions.cpp itemutilfunctions.h
movemanipulator.cpp movemanipulator.h layeritem.cpp layeritem.h
movetool.cpp movetool.h lineeditaction.cpp lineeditaction.h
numberseriesaction.cpp numberseriesaction.h movemanipulator.cpp movemanipulator.h
onedimensionalcluster.cpp onedimensionalcluster.h movetool.cpp movetool.h
resizecontroller.cpp resizecontroller.h numberseriesaction.cpp numberseriesaction.h
resizehandleitem.cpp resizehandleitem.h onedimensionalcluster.cpp onedimensionalcluster.h
resizeindicator.cpp resizeindicator.h resizecontroller.cpp resizecontroller.h
resizemanipulator.cpp resizemanipulator.h resizehandleitem.cpp resizehandleitem.h
resizetool.cpp resizetool.h resizeindicator.cpp resizeindicator.h
rubberbandselectionmanipulator.cpp rubberbandselectionmanipulator.h resizemanipulator.cpp resizemanipulator.h
scaleitem.cpp scaleitem.h resizetool.cpp resizetool.h
scalemanipulator.cpp scalemanipulator.h rubberbandselectionmanipulator.cpp rubberbandselectionmanipulator.h
selectionindicator.cpp selectionindicator.h scaleitem.cpp scaleitem.h
selectionrectangle.cpp selectionrectangle.h scalemanipulator.cpp scalemanipulator.h
selectiontool.cpp selectiontool.h selectionindicator.cpp selectionindicator.h
singleselectionmanipulator.cpp singleselectionmanipulator.h selectionrectangle.cpp selectionrectangle.h
snapper.cpp snapper.h selectiontool.cpp selectiontool.h
snappinglinecreator.cpp snappinglinecreator.h singleselectionmanipulator.cpp singleselectionmanipulator.h
toolbox.cpp toolbox.h snapper.cpp snapper.h
snappinglinecreator.cpp snappinglinecreator.h
toolbox.cpp toolbox.h
) )
extend_qtc_plugin(QmlDesigner components/importmanager extend_qtc_plugin(QmlDesigner
importlabel.cpp importlabel.h SOURCES_PREFIX components/importmanager
importmanager.qrc SOURCES
importmanagercombobox.cpp importmanagercombobox.h importlabel.cpp importlabel.h
importmanagerview.cpp importmanagerview.h importmanager.qrc
importswidget.cpp importswidget.h importmanagercombobox.cpp importmanagercombobox.h
importmanagerview.cpp importmanagerview.h
importswidget.cpp importswidget.h
) )
extend_qtc_plugin(QmlDesigner components/integration extend_qtc_plugin(QmlDesigner
componentaction.cpp componentaction.h SOURCES_PREFIX components/integration
componentview.cpp componentview.h SOURCES
designdocument.cpp designdocument.h componentaction.cpp componentaction.h
designdocumentview.cpp designdocumentview.h componentview.cpp componentview.h
stackedutilitypanelcontroller.cpp stackedutilitypanelcontroller.h designdocument.cpp designdocument.h
utilitypanelcontroller.cpp utilitypanelcontroller.h designdocumentview.cpp designdocumentview.h
stackedutilitypanelcontroller.cpp stackedutilitypanelcontroller.h
utilitypanelcontroller.cpp utilitypanelcontroller.h
) )
extend_qtc_plugin(QmlDesigner components/itemlibrary extend_qtc_plugin(QmlDesigner
customfilesystemmodel.cpp customfilesystemmodel.h SOURCES_PREFIX components/itemlibrary
itemlibrary.qrc SOURCES
itemlibraryimageprovider.cpp itemlibraryimageprovider.h customfilesystemmodel.cpp customfilesystemmodel.h
itemlibraryitem.cpp itemlibraryitem.h itemlibrary.qrc
itemlibrarymodel.cpp itemlibrarymodel.h itemlibraryimageprovider.cpp itemlibraryimageprovider.h
itemlibraryresourceview.cpp itemlibraryresourceview.h itemlibraryitem.cpp itemlibraryitem.h
itemlibrarysection.cpp itemlibrarysection.h itemlibrarymodel.cpp itemlibrarymodel.h
itemlibrarysectionmodel.cpp itemlibrarysectionmodel.h itemlibraryresourceview.cpp itemlibraryresourceview.h
itemlibraryview.cpp itemlibraryview.h itemlibrarysection.cpp itemlibrarysection.h
itemlibrarywidget.cpp itemlibrarywidget.h itemlibrarysectionmodel.cpp itemlibrarysectionmodel.h
itemlibraryview.cpp itemlibraryview.h
itemlibrarywidget.cpp itemlibrarywidget.h
) )
extend_qtc_plugin(QmlDesigner components/navigator extend_qtc_plugin(QmlDesigner
iconcheckboxitemdelegate.cpp iconcheckboxitemdelegate.h SOURCES_PREFIX components/navigator
nameitemdelegate.cpp nameitemdelegate.h SOURCES
navigator.qrc iconcheckboxitemdelegate.cpp iconcheckboxitemdelegate.h
navigatormodelinterface.h nameitemdelegate.cpp nameitemdelegate.h
navigatortreemodel.cpp navigatortreemodel.h navigator.qrc
navigatortreeview.cpp navigatortreeview.h navigatormodelinterface.h
navigatorview.cpp navigatorview.h navigatortreemodel.cpp navigatortreemodel.h
navigatorwidget.cpp navigatorwidget.h navigatortreeview.cpp navigatortreeview.h
navigatorview.cpp navigatorview.h
navigatorwidget.cpp navigatorwidget.h
) )
extend_qtc_plugin(QmlDesigner components/propertyeditor extend_qtc_plugin(QmlDesigner
designerpropertymap.cpp designerpropertymap.h SOURCES_PREFIX components/propertyeditor
fileresourcesmodel.cpp fileresourcesmodel.h SOURCES
gradientmodel.cpp gradientmodel.h designerpropertymap.cpp designerpropertymap.h
gradientpresetcustomlistmodel.cpp gradientpresetcustomlistmodel.h fileresourcesmodel.cpp fileresourcesmodel.h
gradientpresetdefaultlistmodel.cpp gradientpresetdefaultlistmodel.h gradientmodel.cpp gradientmodel.h
gradientpresetitem.cpp gradientpresetitem.h gradientpresetcustomlistmodel.cpp gradientpresetcustomlistmodel.h
gradientpresetlistmodel.cpp gradientpresetlistmodel.h gradientpresetdefaultlistmodel.cpp gradientpresetdefaultlistmodel.h
propertyeditorcontextobject.cpp propertyeditorcontextobject.h gradientpresetitem.cpp gradientpresetitem.h
propertyeditorqmlbackend.cpp propertyeditorqmlbackend.h gradientpresetlistmodel.cpp gradientpresetlistmodel.h
propertyeditortransaction.cpp propertyeditortransaction.h propertyeditorcontextobject.cpp propertyeditorcontextobject.h
propertyeditorvalue.cpp propertyeditorvalue.h propertyeditorqmlbackend.cpp propertyeditorqmlbackend.h
propertyeditorview.cpp propertyeditorview.h propertyeditortransaction.cpp propertyeditortransaction.h
propertyeditorwidget.cpp propertyeditorwidget.h propertyeditorvalue.cpp propertyeditorvalue.h
qmlanchorbindingproxy.cpp qmlanchorbindingproxy.h propertyeditorview.cpp propertyeditorview.h
qmlmodelnodeproxy.cpp qmlmodelnodeproxy.h propertyeditorwidget.cpp propertyeditorwidget.h
quick2propertyeditorview.cpp quick2propertyeditorview.h qmlanchorbindingproxy.cpp qmlanchorbindingproxy.h
qmlmodelnodeproxy.cpp qmlmodelnodeproxy.h
quick2propertyeditorview.cpp quick2propertyeditorview.h
) )
extend_qtc_plugin(QmlDesigner components extend_qtc_plugin(QmlDesigner
resources/resources.qrc SOURCES_PREFIX components
SOURCES resources/resources.qrc
) )
extend_qtc_plugin(QmlDesigner components/stateseditor extend_qtc_plugin(QmlDesigner
stateseditorimageprovider.cpp stateseditorimageprovider.h SOURCES_PREFIX components/stateseditor
stateseditormodel.cpp stateseditormodel.h SOURCES
stateseditorview.cpp stateseditorview.h stateseditorimageprovider.cpp stateseditorimageprovider.h
stateseditorwidget.cpp stateseditorwidget.h stateseditormodel.cpp stateseditormodel.h
stateseditorview.cpp stateseditorview.h
stateseditorwidget.cpp stateseditorwidget.h
) )
extend_qtc_plugin(QmlDesigner components/texteditor extend_qtc_plugin(QmlDesigner
texteditorstatusbar.cpp texteditorstatusbar.h SOURCES_PREFIX components/texteditor
texteditorview.cpp texteditorview.h SOURCES
texteditorwidget.cpp texteditorwidget.h texteditorstatusbar.cpp texteditorstatusbar.h
texteditorview.cpp texteditorview.h
texteditorwidget.cpp texteditorwidget.h
) )
extend_qtc_plugin(QmlDesigner designercore extend_qtc_plugin(QmlDesigner
exceptions/exception.cpp SOURCES_PREFIX designercore
exceptions/invalidargumentexception.cpp SOURCES
exceptions/invalididexception.cpp exceptions/exception.cpp
exceptions/invalidmetainfoexception.cpp exceptions/invalidargumentexception.cpp
exceptions/invalidmodelnodeexception.cpp exceptions/invalididexception.cpp
exceptions/invalidmodelstateexception.cpp exceptions/invalidmetainfoexception.cpp
exceptions/invalidpropertyexception.cpp exceptions/invalidmodelnodeexception.cpp
exceptions/invalidqmlsourceexception.cpp exceptions/invalidmodelstateexception.cpp
exceptions/invalidreparentingexception.cpp exceptions/invalidpropertyexception.cpp
exceptions/invalidslideindexexception.cpp exceptions/invalidqmlsourceexception.cpp
exceptions/notimplementedexception.cpp exceptions/invalidreparentingexception.cpp
exceptions/removebasestateexception.cpp exceptions/invalidslideindexexception.cpp
exceptions/rewritingexception.cpp exceptions/notimplementedexception.cpp
exceptions/removebasestateexception.cpp
exceptions/rewritingexception.cpp
filemanager/addarraymembervisitor.cpp filemanager/addarraymembervisitor.h filemanager/addarraymembervisitor.cpp filemanager/addarraymembervisitor.h
filemanager/addobjectvisitor.cpp filemanager/addobjectvisitor.h filemanager/addobjectvisitor.cpp filemanager/addobjectvisitor.h
filemanager/addpropertyvisitor.cpp filemanager/addpropertyvisitor.h filemanager/addpropertyvisitor.cpp filemanager/addpropertyvisitor.h
filemanager/astobjecttextextractor.cpp filemanager/astobjecttextextractor.h filemanager/astobjecttextextractor.cpp filemanager/astobjecttextextractor.h
filemanager/changeimportsvisitor.cpp filemanager/changeimportsvisitor.h filemanager/changeimportsvisitor.cpp filemanager/changeimportsvisitor.h
filemanager/changeobjecttypevisitor.cpp filemanager/changeobjecttypevisitor.h filemanager/changeobjecttypevisitor.cpp filemanager/changeobjecttypevisitor.h
filemanager/changepropertyvisitor.cpp filemanager/changepropertyvisitor.h filemanager/changepropertyvisitor.cpp filemanager/changepropertyvisitor.h
filemanager/firstdefinitionfinder.cpp filemanager/firstdefinitionfinder.h filemanager/firstdefinitionfinder.cpp filemanager/firstdefinitionfinder.h
filemanager/moveobjectbeforeobjectvisitor.cpp filemanager/moveobjectbeforeobjectvisitor.h filemanager/moveobjectbeforeobjectvisitor.cpp filemanager/moveobjectbeforeobjectvisitor.h
filemanager/moveobjectvisitor.cpp filemanager/moveobjectvisitor.h filemanager/moveobjectvisitor.cpp filemanager/moveobjectvisitor.h
filemanager/objectlengthcalculator.cpp filemanager/objectlengthcalculator.h filemanager/objectlengthcalculator.cpp filemanager/objectlengthcalculator.h
filemanager/qmlrefactoring.cpp filemanager/qmlrefactoring.h filemanager/qmlrefactoring.cpp filemanager/qmlrefactoring.h
filemanager/qmlrewriter.cpp filemanager/qmlrewriter.h filemanager/qmlrewriter.cpp filemanager/qmlrewriter.h
filemanager/removepropertyvisitor.cpp filemanager/removepropertyvisitor.h filemanager/removepropertyvisitor.cpp filemanager/removepropertyvisitor.h
filemanager/removeuiobjectmembervisitor.cpp filemanager/removeuiobjectmembervisitor.h filemanager/removeuiobjectmembervisitor.cpp filemanager/removeuiobjectmembervisitor.h
include/abstractproperty.h include/abstractproperty.h
include/abstractview.h include/abstractview.h
include/anchorline.h include/anchorline.h
include/basetexteditmodifier.h include/basetexteditmodifier.h
include/bindingproperty.h include/bindingproperty.h
include/bytearraymodifier.h include/bytearraymodifier.h
include/componenttextmodifier.h include/componenttextmodifier.h
include/customnotifications.h include/customnotifications.h
include/documentmessage.h include/documentmessage.h
include/exception.h include/exception.h
include/forwardview.h include/forwardview.h
include/import.h include/import.h
include/invalidargumentexception.h include/invalidargumentexception.h
include/invalididexception.h include/invalididexception.h
include/invalidmetainfoexception.h include/invalidmetainfoexception.h
include/invalidmodelnodeexception.h include/invalidmodelnodeexception.h
include/invalidmodelstateexception.h include/invalidmodelstateexception.h
include/invalidpropertyexception.h include/invalidpropertyexception.h
include/invalidqmlsourceexception.h include/invalidqmlsourceexception.h
include/invalidreparentingexception.h include/invalidreparentingexception.h
include/invalidslideindexexception.h include/invalidslideindexexception.h
include/itemlibraryinfo.h include/itemlibraryinfo.h
include/iwidgetplugin.h include/iwidgetplugin.h
include/mathutils.h include/mathutils.h
include/metainfo.h include/metainfo.h
include/metainforeader.h include/metainforeader.h
include/model.h include/model.h
include/modelmerger.h include/modelmerger.h
include/modelnode.h include/modelnode.h
include/modelnodepositionstorage.h include/modelnodepositionstorage.h
include/modificationgroupexception.h include/modificationgroupexception.h
include/modificationgrouptoken.h include/modificationgrouptoken.h
include/nodeabstractproperty.h include/nodeabstractproperty.h
include/nodeanchors.h include/nodeanchors.h
include/nodehints.h include/nodehints.h
include/nodeinstance.h include/nodeinstance.h
include/nodeinstanceview.h include/nodeinstanceview.h
include/nodelistproperty.h include/nodelistproperty.h
include/nodemetainfo.h include/nodemetainfo.h
include/nodeproperty.h include/nodeproperty.h
include/notimplementedexception.h include/notimplementedexception.h
include/objectpropertybinding.h include/objectpropertybinding.h
include/plaintexteditmodifier.h include/plaintexteditmodifier.h
include/propertybinding.h include/propertybinding.h
include/propertycontainer.h include/propertycontainer.h
include/propertynode.h include/propertynode.h
include/propertyparser.h include/propertyparser.h
include/qmlanchors.h include/qmlanchors.h
include/qmlchangeset.h include/qmlchangeset.h
include/qmldesignercorelib_global.h include/qmldesignercorelib_global.h
include/qmlitemnode.h include/qmlitemnode.h
include/qmlmodelnodefacade.h include/qmlmodelnodefacade.h
include/qmlobjectnode.h include/qmlobjectnode.h
include/qmlstate.h include/qmlstate.h
include/qmltimeline.h include/qmltimeline.h
include/qmltimelinekeyframegroup.h include/qmltimelinekeyframegroup.h
include/removebasestateexception.h include/removebasestateexception.h
include/rewriterview.h include/rewriterview.h
include/rewritingexception.h include/rewritingexception.h
include/signalhandlerproperty.h include/signalhandlerproperty.h
include/subcomponentmanager.h include/subcomponentmanager.h
include/textmodifier.h include/textmodifier.h
include/variantproperty.h include/variantproperty.h
include/viewmanager.h include/viewmanager.h
) )
extend_qtc_plugin(QmlDesigner designercore/instances extend_qtc_plugin(QmlDesigner
nodeinstance.cpp SOURCES_PREFIX designercore/instances
nodeinstanceserverproxy.cpp nodeinstanceserverproxy.h SOURCES
nodeinstanceview.cpp nodeinstance.cpp
puppetbuildprogressdialog.cpp puppetbuildprogressdialog.h puppetbuildprogressdialog.ui nodeinstanceserverproxy.cpp nodeinstanceserverproxy.h
puppetcreator.cpp puppetcreator.h nodeinstanceview.cpp
puppetdialog.cpp puppetdialog.h puppetdialog.ui puppetbuildprogressdialog.cpp puppetbuildprogressdialog.h puppetbuildprogressdialog.ui
puppetcreator.cpp puppetcreator.h
puppetdialog.cpp puppetdialog.h puppetdialog.ui
) )
extend_qtc_plugin(QmlDesigner designercore extend_qtc_plugin(QmlDesigner
metainfo/itemlibraryinfo.cpp SOURCES_PREFIX designercore
metainfo/metainfo.cpp SOURCES
metainfo/metainforeader.cpp metainfo/itemlibraryinfo.cpp
metainfo/nodehints.cpp metainfo/metainfo.cpp
metainfo/nodemetainfo.cpp metainfo/metainforeader.cpp
metainfo/subcomponentmanager.cpp metainfo/nodehints.cpp
metainfo/nodemetainfo.cpp
metainfo/subcomponentmanager.cpp
model/abstractproperty.cpp model/abstractproperty.cpp
model/abstractview.cpp model/abstractview.cpp
model/anchorline.cpp model/anchorline.cpp
model/basetexteditmodifier.cpp model/basetexteditmodifier.cpp
model/bindingproperty.cpp model/bindingproperty.cpp
model/componenttextmodifier.cpp model/componenttextmodifier.cpp
model/documentmessage.cpp model/documentmessage.cpp
model/import.cpp model/import.cpp
model/internalbindingproperty.cpp model/internalbindingproperty.h model/internalbindingproperty.cpp model/internalbindingproperty.h
model/internalnode.cpp model/internalnode_p.h model/internalnode.cpp model/internalnode_p.h
model/internalnodeabstractproperty.cpp model/internalnodeabstractproperty.h model/internalnodeabstractproperty.cpp model/internalnodeabstractproperty.h
model/internalnodelistproperty.cpp model/internalnodelistproperty.h model/internalnodelistproperty.cpp model/internalnodelistproperty.h
model/internalnodeproperty.cpp model/internalnodeproperty.h model/internalnodeproperty.cpp model/internalnodeproperty.h
model/internalproperty.cpp model/internalproperty.h model/internalproperty.cpp model/internalproperty.h
model/internalsignalhandlerproperty.cpp model/internalsignalhandlerproperty.h model/internalsignalhandlerproperty.cpp model/internalsignalhandlerproperty.h
model/internalvariantproperty.cpp model/internalvariantproperty.h model/internalvariantproperty.cpp model/internalvariantproperty.h
model/model.cpp model/model_p.h model/model.cpp model/model_p.h
model/modelmerger.cpp model/modelmerger.cpp
model/modelnode.cpp model/modelnode.cpp
model/modelnodepositionrecalculator.cpp model/modelnodepositionrecalculator.h model/modelnodepositionrecalculator.cpp model/modelnodepositionrecalculator.h
model/modelnodepositionstorage.cpp model/modelnodepositionstorage.cpp
model/modeltotextmerger.cpp model/modeltotextmerger.h model/modeltotextmerger.cpp model/modeltotextmerger.h
model/nodeabstractproperty.cpp model/nodeabstractproperty.cpp
model/nodelistproperty.cpp model/nodelistproperty.cpp
model/nodeproperty.cpp model/nodeproperty.cpp
model/plaintexteditmodifier.cpp model/plaintexteditmodifier.cpp
model/propertycontainer.cpp model/propertycontainer.cpp
model/propertynode.cpp model/propertynode.cpp
model/propertyparser.cpp model/propertyparser.cpp
model/qmlanchors.cpp model/qmlanchors.cpp
model/qmlchangeset.cpp model/qmlchangeset.cpp
model/qmlitemnode.cpp model/qmlitemnode.cpp
model/qmlmodelnodefacade.cpp model/qmlmodelnodefacade.cpp
model/qmlobjectnode.cpp model/qmlobjectnode.cpp
model/qmlstate.cpp model/qmlstate.cpp
model/qmltextgenerator.cpp model/qmltextgenerator.h model/qmltextgenerator.cpp model/qmltextgenerator.h
model/qmltimeline.cpp model/qmltimeline.cpp
model/qmltimelinekeyframegroup.cpp model/qmltimelinekeyframegroup.cpp
model/rewriteaction.cpp model/rewriteaction.h model/rewriteaction.cpp model/rewriteaction.h
model/rewriteactioncompressor.cpp model/rewriteactioncompressor.h model/rewriteactioncompressor.cpp model/rewriteactioncompressor.h
model/rewriterview.cpp model/rewriterview.cpp
model/signalhandlerproperty.cpp model/signalhandlerproperty.cpp
model/textmodifier.cpp model/textmodifier.cpp
model/texttomodelmerger.cpp model/texttomodelmerger.h model/texttomodelmerger.cpp model/texttomodelmerger.h
model/variantproperty.cpp model/variantproperty.cpp
model/viewmanager.cpp model/viewmanager.cpp
pluginmanager/widgetpluginmanager.cpp pluginmanager/widgetpluginmanager.h pluginmanager/widgetpluginmanager.cpp pluginmanager/widgetpluginmanager.h
pluginmanager/widgetpluginpath.cpp pluginmanager/widgetpluginpath.h pluginmanager/widgetpluginpath.cpp pluginmanager/widgetpluginpath.h
rewritertransaction.cpp rewritertransaction.h rewritertransaction.cpp rewritertransaction.h
) )
extend_qtc_plugin(QmlDesigner qmldesignerextension extend_qtc_plugin(QmlDesigner
colortool/colortool.cpp colortool/colortool.h SOURCES_PREFIX qmldesignerextension/colortool
SOURCES colortool.cpp colortool.h
) )
extend_qtc_plugin(QmlDesigner qmldesignerextension/connectioneditor extend_qtc_plugin(QmlDesigner
addnewbackenddialog.cpp addnewbackenddialog.h addnewbackenddialog.ui SOURCES_PREFIX qmldesignerextension/connectioneditor
backendmodel.cpp backendmodel.h SOURCES
bindingmodel.cpp bindingmodel.h addnewbackenddialog.cpp addnewbackenddialog.h addnewbackenddialog.ui
connectioneditor.qrc backendmodel.cpp backendmodel.h
connectionmodel.cpp connectionmodel.h bindingmodel.cpp bindingmodel.h
connectionview.cpp connectionview.h connectioneditor.qrc
connectionviewwidget.cpp connectionviewwidget.h connectionviewwidget.ui connectionmodel.cpp connectionmodel.h
delegates.cpp delegates.h connectionview.cpp connectionview.h
dynamicpropertiesmodel.cpp dynamicpropertiesmodel.h connectionviewwidget.cpp connectionviewwidget.h connectionviewwidget.ui
delegates.cpp delegates.h
dynamicpropertiesmodel.cpp dynamicpropertiesmodel.h
) )
extend_qtc_plugin(QmlDesigner qmldesignerextension extend_qtc_plugin(QmlDesigner
pathtool/controlpoint.cpp pathtool/controlpoint.h SOURCES_PREFIX qmldesignerextension
pathtool/cubicsegment.cpp pathtool/cubicsegment.h SOURCES
pathtool/pathitem.cpp pathtool/pathitem.h pathtool/controlpoint.cpp pathtool/controlpoint.h
pathtool/pathselectionmanipulator.cpp pathtool/pathselectionmanipulator.h pathtool/cubicsegment.cpp pathtool/cubicsegment.h
pathtool/pathtool.cpp pathtool/pathtool.h pathtool/pathitem.cpp pathtool/pathitem.h
pathtool/pathtoolview.cpp pathtool/pathtoolview.h pathtool/pathselectionmanipulator.cpp pathtool/pathselectionmanipulator.h
pathtool/pathtool.cpp pathtool/pathtool.h
pathtool/pathtoolview.cpp pathtool/pathtoolview.h
qmldesignerextensionconstants.h qmldesignerextensionconstants.h
qmldesignerextension_global.h qmldesignerextension_global.h
sourcetool/sourcetool.cpp sourcetool/sourcetool.h sourcetool/sourcetool.cpp sourcetool/sourcetool.h
texttool/textedititem.cpp texttool/textedititem.h texttool/textedititem.cpp texttool/textedititem.h
texttool/textedititemwidget.cpp texttool/textedititemwidget.h texttool/textedititemwidget.cpp texttool/textedititemwidget.h
texttool/texttool.cpp texttool/texttool.h texttool/texttool.cpp texttool/texttool.h
) )
extend_qtc_plugin(QmlDesigner qmldesignerextension/timelineeditor extend_qtc_plugin(QmlDesigner
canvas.cpp canvas.h SOURCES_PREFIX qmldesignerextension/timelineeditor
canvasstyledialog.cpp canvasstyledialog.h SOURCES
easingcurve.cpp easingcurve.h canvas.cpp canvas.h
easingcurvedialog.cpp easingcurvedialog.h canvasstyledialog.cpp canvasstyledialog.h
preseteditor.cpp preseteditor.h easingcurve.cpp easingcurve.h
setframevaluedialog.cpp setframevaluedialog.h setframevaluedialog.ui easingcurvedialog.cpp easingcurvedialog.h
splineeditor.cpp splineeditor.h preseteditor.cpp preseteditor.h
timeline.qrc setframevaluedialog.cpp setframevaluedialog.h setframevaluedialog.ui
timelineabstracttool.cpp timelineabstracttool.h splineeditor.cpp splineeditor.h
timelineactions.cpp timelineactions.h timeline.qrc
timelineanimationform.cpp timelineanimationform.h timelineanimationform.ui timelineabstracttool.cpp timelineabstracttool.h
timelineconstants.h timelineactions.cpp timelineactions.h
timelinecontext.cpp timelinecontext.h timelineanimationform.cpp timelineanimationform.h timelineanimationform.ui
timelinecontrols.cpp timelinecontrols.h timelineconstants.h
timelineform.cpp timelineform.h timelineform.ui timelinecontext.cpp timelinecontext.h
timelinegraphicslayout.cpp timelinegraphicslayout.h timelinecontrols.cpp timelinecontrols.h
timelinegraphicsscene.cpp timelinegraphicsscene.h timelineform.cpp timelineform.h timelineform.ui
timelineicons.h timelinegraphicslayout.cpp timelinegraphicslayout.h
timelineitem.cpp timelineitem.h timelinegraphicsscene.cpp timelinegraphicsscene.h
timelinemovableabstractitem.cpp timelinemovableabstractitem.h timelineicons.h
timelinemovetool.cpp timelinemovetool.h timelineitem.cpp timelineitem.h
timelineplaceholder.cpp timelineplaceholder.h timelinemovableabstractitem.cpp timelinemovableabstractitem.h
timelinepropertyitem.cpp timelinepropertyitem.h timelinemovetool.cpp timelinemovetool.h
timelinesectionitem.cpp timelinesectionitem.h timelineplaceholder.cpp timelineplaceholder.h
timelineselectiontool.cpp timelineselectiontool.h timelinepropertyitem.cpp timelinepropertyitem.h
timelinesettingsdialog.cpp timelinesectionitem.cpp timelinesectionitem.h
timelinesettingsdialog.h timelinesettingsdialog.ui timelineselectiontool.cpp timelineselectiontool.h
timelinesettingsmodel.cpp timelinesettingsmodel.h timelinesettingsdialog.cpp
timelinetoolbar.cpp timelinetoolbar.h timelinesettingsdialog.h timelinesettingsdialog.ui
timelinetoolbutton.cpp timelinetoolbutton.h timelinesettingsmodel.cpp timelinesettingsmodel.h
timelinetooldelegate.cpp timelinetooldelegate.h timelinetoolbar.cpp timelinetoolbar.h
timelineutils.cpp timelineutils.h timelinetoolbutton.cpp timelinetoolbutton.h
timelineview.cpp timelineview.h timelinetooldelegate.cpp timelinetooldelegate.h
timelinewidget.cpp timelinewidget.h timelineutils.cpp timelineutils.h
timelineview.cpp timelineview.h
timelinewidget.cpp timelinewidget.h
) )
# Do the file comparison at the end, due to all the extend_qtc_plugin calls # Do the file comparison at the end, due to all the extend_qtc_plugin calls

View File

@@ -20,6 +20,7 @@ add_qtc_plugin(QmlJSTools
qmljstoolssettings.cpp qmljstoolssettings.h qmljstoolssettings.cpp qmljstoolssettings.h
) )
if (WITH_TESTS) extend_qtc_plugin(QmlJSTools
target_sources(QmlJSTools PRIVATE qmljstools_test.cpp) CONDITION WITH_TESTS
endif() SOURCES qmljstools_test.cpp
)

View File

@@ -10,9 +10,9 @@ add_qtc_plugin(QmlPreview
qmlpreview_global.h qmlpreview_global.h
) )
if (WITH_TESTS) extend_qtc_plugin(QmlPreview
target_sources(QmlPreview PRIVATE CONDITION WITH_TESTS
SOURCES
tests/qmlpreviewclient_test.cpp tests/qmlpreviewclient_test.h tests/qmlpreviewclient_test.cpp tests/qmlpreviewclient_test.h
tests/qmlpreviewplugin_test.cpp tests/qmlpreviewplugin_test.h tests/qmlpreviewplugin_test.cpp tests/qmlpreviewplugin_test.h
) )
endif()

View File

@@ -47,8 +47,9 @@ add_qtc_plugin(QmlProfiler
scenegraphtimelinemodel.cpp scenegraphtimelinemodel.h scenegraphtimelinemodel.cpp scenegraphtimelinemodel.h
) )
if (WITH_TESTS) extend_qtc_plugin(QmlProfiler
target_sources(QmlProfiler PRIVATE CONDITION WITH_TESTS
SOURCES
tests/debugmessagesmodel_test.cpp tests/debugmessagesmodel_test.h tests/debugmessagesmodel_test.cpp tests/debugmessagesmodel_test.h
tests/fakedebugserver.cpp tests/fakedebugserver.h tests/fakedebugserver.cpp tests/fakedebugserver.h
tests/flamegraphmodel_test.cpp tests/flamegraphmodel_test.h tests/flamegraphmodel_test.cpp tests/flamegraphmodel_test.h
@@ -71,5 +72,4 @@ if (WITH_TESTS)
tests/qmlprofilertraceclient_test.cpp tests/qmlprofilertraceclient_test.h tests/qmlprofilertraceclient_test.cpp tests/qmlprofilertraceclient_test.h
tests/qmlprofilertraceview_test.cpp tests/qmlprofilertraceview_test.h tests/qmlprofilertraceview_test.cpp tests/qmlprofilertraceview_test.h
tests/tests.qrc tests/tests.qrc
) )
endif()

View File

@@ -102,6 +102,7 @@ add_qtc_plugin(TextEditor
typingsettings.cpp typingsettings.h typingsettings.cpp typingsettings.h
) )
if (WITH_TESTS) extend_qtc_plugin(TextEditor
target_sources(TextEditor PRIVATE texteditor_test.cpp) CONDITION WITH_TESTS
endif() SOURCES texteditor_test.cpp
)

View File

@@ -45,19 +45,19 @@ add_qtc_plugin(Valgrind
xmlprotocol/threadedparser.cpp xmlprotocol/threadedparser.h xmlprotocol/threadedparser.cpp xmlprotocol/threadedparser.h
) )
if (WIN32) extend_qtc_plugin(Valgrind
target_compile_definitions(Valgrind PRIVATE UNICODE _UNICODE) CONDITION WIN32
endif() DEFINES UNICODE _UNICODE
)
if (WITH_TESTS) extend_qtc_plugin(Valgrind
target_sources(Valgrind PRIVATE CONDITION WITH_TESTS
SOURCES
valgrindmemcheckparsertest.cpp valgrindmemcheckparsertest.h valgrindmemcheckparsertest.cpp valgrindmemcheckparsertest.h
valgrindtestrunnertest.cpp valgrindtestrunnertest.h valgrindtestrunnertest.cpp valgrindtestrunnertest.h
) DEFINES
target_compile_definitions(Valgrind PRIVATE
PARSERTESTS_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/unit_testdata" PARSERTESTS_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/unit_testdata"
VALGRIND_FAKE_PATH="${PROJECT_SOURCE_DIR}/src/tools/valgrindfake" VALGRIND_FAKE_PATH="${PROJECT_SOURCE_DIR}/src/tools/valgrindfake"
TESTRUNNER_SRC_DIR="${PROJECT_SOURCE_DIR}/tests/auto/valgrind/memcheck/testapps" TESTRUNNER_SRC_DIR="${PROJECT_SOURCE_DIR}/tests/auto/valgrind/memcheck/testapps"
TESTRUNNER_APP_DIR="${PROJECT_BINARY_DIR}/tests/auto/valgrind/memcheck/testapps" TESTRUNNER_APP_DIR="${PROJECT_BINARY_DIR}/tests/auto/valgrind/memcheck/testapps"
) )
endif()

View File

@@ -33,6 +33,7 @@ add_qtc_plugin(VcsBase
wizard/vcsjsextension.cpp wizard/vcsjsextension.h wizard/vcsjsextension.cpp wizard/vcsjsextension.h
) )
if (WITH_TESTS) extend_qtc_plugin(VcsBase
target_compile_definitions(VcsBase PRIVATE SRC_DIR="${IDE_SOURCE_TREE}") CONDITION WITH_TESTS
endif() DEFINES SRC_DIR="${IDE_SOURCE_TREE}"
)