From 55fa109b5935725e8f4c0b1bbd286017b6f52979 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 20 Dec 2022 17:31:22 +0100 Subject: [PATCH] CMake build: Use version-less Qt targets Since we do not support Qt < 5.15 anymore, and as a first step for getting rid of our special FindQt5.cmake. Change-Id: Icc5dbaf9b0a3a622b1f609ff114b9decb6d2856c Reviewed-by: Reviewed-by: Cristian Adam --- CMakeLists.txt | 8 +++---- cmake/QtCreatorAPI.cmake | 4 ++-- cmake/QtCreatorAPIInternal.cmake | 11 +++++---- cmake/QtCreatorDocumentation.cmake | 12 +++++----- cmake/QtCreatorTranslations.cmake | 10 ++++---- cmake/Utils.cmake | 2 +- doc/CMakeLists.txt | 4 +++- src/app/CMakeLists.txt | 2 +- src/libs/3rdparty/cplusplus/CMakeLists.txt | 2 +- .../syntax-highlighting/CMakeLists.txt | 2 +- .../src/indexer/CMakeLists.txt | 2 +- src/libs/advanceddockingsystem/CMakeLists.txt | 2 +- src/libs/aggregation/CMakeLists.txt | 2 +- src/libs/cplusplus/CMakeLists.txt | 6 ++--- src/libs/extensionsystem/CMakeLists.txt | 6 ++--- src/libs/glsl/CMakeLists.txt | 2 +- src/libs/languageutils/CMakeLists.txt | 2 +- src/libs/modelinglib/CMakeLists.txt | 2 +- src/libs/nanotrace/CMakeLists.txt | 2 +- src/libs/qmldebug/CMakeLists.txt | 2 +- src/libs/qmleditorwidgets/CMakeLists.txt | 2 +- src/libs/qmljs/CMakeLists.txt | 4 ++-- .../QmlPuppetCommunication.cmake | 2 +- src/libs/sqlite/CMakeLists.txt | 2 +- src/libs/tracing/CMakeLists.txt | 6 ++--- src/libs/utils/CMakeLists.txt | 8 +++---- src/plugins/android/CMakeLists.txt | 2 +- src/plugins/beautifier/CMakeLists.txt | 2 +- src/plugins/boot2qt/CMakeLists.txt | 2 +- src/plugins/clangformat/CMakeLists.txt | 2 +- .../exported-diagnostics/CMakeLists.txt | 2 +- src/plugins/coreplugin/CMakeLists.txt | 2 +- src/plugins/cpaster/CMakeLists.txt | 2 +- src/plugins/cpaster/frontend/CMakeLists.txt | 2 +- src/plugins/cppcheck/CMakeLists.txt | 2 +- src/plugins/cppeditor/CMakeLists.txt | 4 ++-- src/plugins/ctfvisualizer/CMakeLists.txt | 2 +- src/plugins/designer/CMakeLists.txt | 10 ++++---- src/plugins/help/CMakeLists.txt | 6 ++--- src/plugins/imageviewer/CMakeLists.txt | 4 ++-- src/plugins/ios/CMakeLists.txt | 2 +- src/plugins/languageclient/CMakeLists.txt | 2 +- src/plugins/mcusupport/CMakeLists.txt | 2 +- .../mesonprojectmanager/CMakeLists.txt | 8 +++---- src/plugins/modeleditor/CMakeLists.txt | 2 +- src/plugins/perfprofiler/CMakeLists.txt | 2 +- src/plugins/projectexplorer/CMakeLists.txt | 2 +- src/plugins/qbsprojectmanager/CMakeLists.txt | 2 +- src/plugins/qmldesigner/CMakeLists.txt | 24 ++++++++----------- src/plugins/qmlpreview/CMakeLists.txt | 2 +- src/plugins/qmlprofiler/CMakeLists.txt | 2 +- src/plugins/qmlprojectmanager/CMakeLists.txt | 4 ++-- src/plugins/qnx/CMakeLists.txt | 2 +- src/plugins/qtsupport/CMakeLists.txt | 2 +- src/plugins/resourceeditor/CMakeLists.txt | 2 +- src/plugins/serialterminal/CMakeLists.txt | 4 ++-- src/plugins/studiowelcome/CMakeLists.txt | 4 ++-- src/plugins/texteditor/CMakeLists.txt | 2 +- src/plugins/updateinfo/CMakeLists.txt | 2 +- src/plugins/webassembly/CMakeLists.txt | 2 +- .../designerintegrationv2/CMakeLists.txt | 8 ++++--- src/shared/help/CMakeLists.txt | 6 ++--- src/shared/proparser/CMakeLists.txt | 2 +- src/shared/qtlockedfile/CMakeLists.txt | 2 +- src/shared/qtsingleapplication/CMakeLists.txt | 2 +- src/shared/registryaccess/CMakeLists.txt | 2 +- src/tools/CMakeLists.txt | 2 +- src/tools/iostool/CMakeLists.txt | 6 ++--- src/tools/processlauncher/CMakeLists.txt | 2 +- src/tools/qml2puppet/CMakeLists.txt | 22 ++++++++--------- src/tools/qtc-askpass/CMakeLists.txt | 2 +- src/tools/qtcdebugger/CMakeLists.txt | 2 +- .../qtcreatorcrashhandler/CMakeLists.txt | 2 +- src/tools/qtpromaker/CMakeLists.txt | 2 +- src/tools/sdktool/CMakeLists.txt | 2 +- src/tools/valgrindfake/CMakeLists.txt | 2 +- tests/auto/aggregation/CMakeLists.txt | 2 +- tests/auto/debugger/CMakeLists.txt | 12 +++++----- .../qml/qmldesigner/coretests/CMakeLists.txt | 4 ++-- tests/auto/tracing/flamegraph/CMakeLists.txt | 2 +- .../tracing/flamegraphview/CMakeLists.txt | 2 +- .../timelineabstractrenderer/CMakeLists.txt | 2 +- .../timelineitemsrenderpass/CMakeLists.txt | 2 +- .../auto/tracing/timelinemodel/CMakeLists.txt | 2 +- .../timelinemodelaggregator/CMakeLists.txt | 2 +- .../tracing/timelinenotesmodel/CMakeLists.txt | 2 +- .../timelinenotesrenderpass/CMakeLists.txt | 2 +- .../timelineoverviewrenderer/CMakeLists.txt | 2 +- .../tracing/timelinerenderer/CMakeLists.txt | 2 +- .../timelinerenderstate/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../timelinezoomcontrol/CMakeLists.txt | 2 +- tests/auto/updateinfo/CMakeLists.txt | 2 +- tests/auto/valgrind/callgrind/CMakeLists.txt | 2 +- .../memcheck/testapps/leak1/CMakeLists.txt | 2 +- .../memcheck/testapps/leak4/CMakeLists.txt | 2 +- tests/manual/proparser/CMakeLists.txt | 2 +- .../manual/widgets/crumblepath/CMakeLists.txt | 2 +- tests/manual/widgets/infolabel/CMakeLists.txt | 2 +- .../widgets/layoutbuilder/CMakeLists.txt | 2 +- .../widgets/manhattanstyle/CMakeLists.txt | 2 +- tests/manual/widgets/tracing/CMakeLists.txt | 2 +- tests/tools/qml-ast2dot/CMakeLists.txt | 2 +- tests/unit/CMakeLists.txt | 2 +- tests/unit/unittest/CMakeLists.txt | 4 ++-- 105 files changed, 184 insertions(+), 181 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33563c04ac3..376e6cc60c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,7 @@ set(CMAKE_AUTOUIC ON) if (WITH_TESTS) set(QT_TEST_COMPONENT Test) - set(IMPLICIT_DEPENDS Qt5::Test) + set(IMPLICIT_DEPENDS Qt::Test) endif() # suppress bogus warning @@ -124,12 +124,12 @@ function (set_if_target var target) set(${var} "${_result}" PARENT_SCOPE) endfunction() -set_if_target(_has_svg_target Qt5::Svg) +set_if_target(_has_svg_target Qt::Svg) option(ENABLE_SVG_SUPPORT "Enable SVG support" "${_has_svg_target}") add_library(OptionalSvg INTERFACE) -if (TARGET Qt5::Svg AND ENABLE_SVG_SUPPORT) - target_link_libraries(OptionalSvg INTERFACE Qt5::Svg) +if (TARGET Qt::Svg AND ENABLE_SVG_SUPPORT) + target_link_libraries(OptionalSvg INTERFACE Qt::Svg) else() target_compile_definitions(OptionalSvg INTERFACE QT_NO_SVG) endif() diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index 68461f8bcd6..87edde968c1 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -1054,11 +1054,11 @@ function(qtc_add_resources target resourceName) # Process .qrc file: add_custom_command(OUTPUT "${generatedSourceCode}" - COMMAND Qt5::rcc ${rccArgs} + COMMAND Qt::rcc ${rccArgs} DEPENDS ${resource_dependencies} ${generatedResourceFile} - "Qt5::rcc" + "Qt::rcc" COMMENT "RCC ${newResourceName}" VERBATIM) diff --git a/cmake/QtCreatorAPIInternal.cmake b/cmake/QtCreatorAPIInternal.cmake index ace1f3c8d1c..efe7efd9ce7 100644 --- a/cmake/QtCreatorAPIInternal.cmake +++ b/cmake/QtCreatorAPIInternal.cmake @@ -277,7 +277,8 @@ function(finalize_test_setup test_name) list(APPEND env_path $ENV{PATH}) list(APPEND env_path ${CMAKE_BINARY_DIR}/${_IDE_PLUGIN_PATH}) list(APPEND env_path ${CMAKE_BINARY_DIR}/${_IDE_BIN_PATH}) - list(APPEND env_path $) + # version-less target Qt::Test is an interface library that links to QtX::Test + list(APPEND env_path $>) if (TARGET libclang) list(APPEND env_path $) endif() @@ -430,15 +431,15 @@ function(enable_pch target) PROPERTIES GENERATED TRUE) _add_pch_target(${PROJECT_NAME}PchGui - "${QtCreator_SOURCE_DIR}/src/shared/qtcreator_gui_pch.h" Qt5::Widgets) + "${QtCreator_SOURCE_DIR}/src/shared/qtcreator_gui_pch.h" Qt::Widgets) _add_pch_target(${PROJECT_NAME}PchConsole - "${QtCreator_SOURCE_DIR}/src/shared/qtcreator_pch.h" Qt5::Core) + "${QtCreator_SOURCE_DIR}/src/shared/qtcreator_pch.h" Qt::Core) endif() unset(PCH_TARGET) - if ("Qt5::Widgets" IN_LIST dependencies) + if ("Qt::Widgets" IN_LIST dependencies) set(PCH_TARGET ${PROJECT_NAME}PchGui) - elseif ("Qt5::Core" IN_LIST dependencies) + elseif ("Qt::Core" IN_LIST dependencies) set(PCH_TARGET ${PROJECT_NAME}PchConsole) endif() diff --git a/cmake/QtCreatorDocumentation.cmake b/cmake/QtCreatorDocumentation.cmake index a652d625176..0dbd46f47a0 100644 --- a/cmake/QtCreatorDocumentation.cmake +++ b/cmake/QtCreatorDocumentation.cmake @@ -9,7 +9,7 @@ add_feature_info("Build online documentation" WITH_ONLINE_DOCS "") # as this is not yet exported by cmake. # Used for QT_INSTALL_DOCS function(qt5_query_qmake) - if (NOT TARGET Qt5::qmake) + if (NOT TARGET Qt::qmake) message(FATAL_ERROR "Qmake was not found. Add find_package(Qt5 COMPONENTS Core) to CMake to enable.") endif() # dummy check for if we already queried qmake @@ -17,7 +17,7 @@ function(qt5_query_qmake) return() endif() - get_target_property(_qmake_binary Qt5::qmake IMPORTED_LOCATION) + get_target_property(_qmake_binary Qt::qmake IMPORTED_LOCATION) execute_process(COMMAND "${_qmake_binary}" "-query" TIMEOUT 10 RESULT_VARIABLE _qmake_result @@ -45,11 +45,11 @@ endfunction() # Find programs: function(_doc_find_program result_var) - if (NOT TARGET Qt5::qmake) + if (NOT TARGET Qt::qmake) message(FATAL_ERROR "QDoc is only available in Qt5 projects") endif() - get_target_property(_qmake_binary Qt5::qmake IMPORTED_LOCATION) + get_target_property(_qmake_binary Qt::qmake IMPORTED_LOCATION) get_filename_component(_qmake_dir "${_qmake_binary}" DIRECTORY) find_program("_prg_${result_var}" ${ARGN} HINTS "${_qmake_dir}") if ("_prg_${result_var}" STREQUAL "_prg_${result_var}-NOTFOUND") @@ -153,7 +153,7 @@ function(_setup_qhelpgenerator_targets _qdocconf_file _html_outputdir) set(_arg_QCH_DIR "${CMAKE_CURRENT_BINARY_DIR}/doc") endif() - if (NOT TARGET Qt5::qhelpgenerator) + if (NOT TARGET Qt::qhelpgenerator) message(WARNING "qhelpgenerator missing: No QCH documentation targets were generated. Add find_package(Qt5 COMPONENTS Help) to CMake to enable.") return() endif() @@ -166,7 +166,7 @@ function(_setup_qhelpgenerator_targets _qdocconf_file _html_outputdir) set(_qch_target "qch_docs_${_target}") set(_html_target "html_docs_${_target}") add_custom_target("${_qch_target}" - Qt5::qhelpgenerator "${_html_outputdir}/${_target}.qhp" -o "${_qch_outputdir}/${_target}.qch" + Qt::qhelpgenerator "${_html_outputdir}/${_target}.qhp" -o "${_qch_outputdir}/${_target}.qch" COMMENT "Build QCH documentation from ${_qdocconf_file}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" VERBATIM diff --git a/cmake/QtCreatorTranslations.cmake b/cmake/QtCreatorTranslations.cmake index 2fb3f799822..3c35f2f9126 100644 --- a/cmake/QtCreatorTranslations.cmake +++ b/cmake/QtCreatorTranslations.cmake @@ -91,7 +91,7 @@ function(_create_ts_custom_target name) file(WRITE "${ts_file_list}" "${_sources_str}\n${_includes_str}\n") add_custom_target("${_arg_TS_TARGET_PREFIX}${name}" - COMMAND Qt5::lupdate -locations relative -no-ui-lines -no-sort "@${ts_file_list}" -ts ${ts_files} + COMMAND Qt::lupdate -locations relative -no-ui-lines -no-sort "@${ts_file_list}" -ts ${ts_files} WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "Generate .ts files" DEPENDS ${_sources} @@ -103,11 +103,11 @@ function(_create_ts_custom_target name) list(LENGTH ts_files file_count) if(file_count EQUAL 1) # get path for lconvert... - get_target_property(_lupdate_binary Qt5::lupdate IMPORTED_LOCATION) + get_target_property(_lupdate_binary Qt::lupdate IMPORTED_LOCATION) get_filename_component(_bin_dir ${_lupdate_binary} DIRECTORY) add_custom_target("${_arg_TS_TARGET_PREFIX}${name}_cleaned" - COMMAND Qt5::lupdate -locations relative -no-ui-lines -no-sort "@${ts_file_list}" -ts ${ts_files} + COMMAND Qt::lupdate -locations relative -no-ui-lines -no-sort "@${ts_file_list}" -ts ${ts_files} COMMAND ${_bin_dir}/lconvert -locations none -no-ui-lines -no-obsolete ${ts_files} -o ${ts_files} WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "Generate .ts files, remove obsolete and vanished translations, and do not add files and line number" @@ -117,7 +117,7 @@ function(_create_ts_custom_target name) endfunction() function(add_translation_targets file_prefix) - if (NOT TARGET Qt5::lrelease OR NOT TARGET Qt5::lupdate) + if (NOT TARGET Qt::lrelease OR NOT TARGET Qt::lupdate) # No Qt translation tools were found: Skip this directory message(WARNING "No Qt translation tools found, skipping translation targets. Add find_package(Qt5 COMPONENTS LinguistTools) to CMake to enable.") return() @@ -170,7 +170,7 @@ function(add_translation_targets file_prefix) SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES}) add_custom_command(OUTPUT "${_qm_file}" - COMMAND Qt5::lrelease "${_ts_file}" -qm "${_qm_file}" + COMMAND Qt::lrelease "${_ts_file}" -qm "${_qm_file}" MAIN_DEPENDENCY "${_ts_file}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "Generate .qm file" diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake index 602781ca391..d684b972648 100644 --- a/cmake/Utils.cmake +++ b/cmake/Utils.cmake @@ -11,7 +11,7 @@ function(setup_dependencies_component) if (NOT Python3_Interpreter_FOUND) message("No python interpreter found, skipping \"Dependencies\" install component.") else() - get_target_property(_qmake_binary Qt5::qmake IMPORTED_LOCATION) + get_target_property(_qmake_binary Qt::qmake IMPORTED_LOCATION) set(_llvm_arg) if (LLVM_INSTALL_PREFIX) set(_llvm_arg "--llvm \"${LLVM_INSTALL_PREFIX}\"") diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 077d181493d..23cada05909 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -25,7 +25,9 @@ function(_find_all_includes _ret_includes _ret_framework_paths) # framework path if (APPLE) - get_target_property(_qt_target Qt5::Core LOCATION) # /QtCore.framework/QtCore + # version-less target Qt::Core is an interface library that links to QtX::Core + get_target_property(_qt_core Qt::Core INTERFACE_LINK_LIBRARIES) + get_target_property(_qt_target ${_qt_core} LOCATION) # /QtCore.framework/QtCore get_filename_component(_qt_loc "${_qt_target}" DIRECTORY) set("${_ret_framework_paths}" "${_qt_loc}/.." PARENT_SCOPE) endif() diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index cc56d7703ed..a7090e2d95a 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -12,7 +12,7 @@ install( add_qtc_executable(qtcreator DEFINES IDE_LIBRARY_BASENAME=\"${IDE_LIBRARY_BASE_PATH}\" - DEPENDS Aggregation ExtensionSystem Qt5::Core Qt5::Widgets Utils shared_qtsingleapplication app_version + DEPENDS Aggregation ExtensionSystem Qt::Core Qt::Widgets Utils shared_qtsingleapplication app_version SOURCES main.cpp ../tools/qtcreatorcrashhandler/crashhandlersetup.cpp ../tools/qtcreatorcrashhandler/crashhandlersetup.h diff --git a/src/libs/3rdparty/cplusplus/CMakeLists.txt b/src/libs/3rdparty/cplusplus/CMakeLists.txt index e7b9fedd0bc..2758ffe6eeb 100644 --- a/src/libs/3rdparty/cplusplus/CMakeLists.txt +++ b/src/libs/3rdparty/cplusplus/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_library(3rd_cplusplus OBJECT - PUBLIC_DEPENDS Qt5::Core Utils + PUBLIC_DEPENDS Qt::Core Utils SOURCES AST.cpp AST.h ASTClone.cpp diff --git a/src/libs/3rdparty/syntax-highlighting/CMakeLists.txt b/src/libs/3rdparty/syntax-highlighting/CMakeLists.txt index d6b3f83d738..8130a0eb7c4 100644 --- a/src/libs/3rdparty/syntax-highlighting/CMakeLists.txt +++ b/src/libs/3rdparty/syntax-highlighting/CMakeLists.txt @@ -11,7 +11,7 @@ add_qtc_library(KSyntaxHighlighting src/lib autogenerated/include autogenerated/src/lib - DEPENDS Qt5::Network Qt5::Widgets + DEPENDS Qt::Network Qt::Widgets SOURCES autogenerated/src/lib/ksyntaxhighlighting_logging.cpp autogenerated/src/lib/ksyntaxhighlighting_logging.h autogenerated/ksyntaxhighlighting_version.h diff --git a/src/libs/3rdparty/syntax-highlighting/src/indexer/CMakeLists.txt b/src/libs/3rdparty/syntax-highlighting/src/indexer/CMakeLists.txt index 77a16faf22e..edaa0a65c65 100644 --- a/src/libs/3rdparty/syntax-highlighting/src/indexer/CMakeLists.txt +++ b/src/libs/3rdparty/syntax-highlighting/src/indexer/CMakeLists.txt @@ -32,7 +32,7 @@ else() add_executable(katehighlightingindexer katehighlightingindexer.cpp ../lib/worddelimiters.cpp) ecm_mark_nongui_executable(katehighlightingindexer) if(Qt5XmlPatterns_FOUND AND NOT ECM_ENABLE_SANITIZERS) - target_link_libraries(katehighlightingindexer Qt5::XmlPatterns) + target_link_libraries(katehighlightingindexer Qt::XmlPatterns) else() target_link_libraries(katehighlightingindexer Qt${QT_MAJOR_VERSION}::Core) endif() diff --git a/src/libs/advanceddockingsystem/CMakeLists.txt b/src/libs/advanceddockingsystem/CMakeLists.txt index de136645353..f22d3befe8c 100644 --- a/src/libs/advanceddockingsystem/CMakeLists.txt +++ b/src/libs/advanceddockingsystem/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_library(AdvancedDockingSystem - DEPENDS Qt5::Widgets Qt5::Core Qt5::Gui Utils + DEPENDS Qt::Widgets Qt::Core Qt::Gui Utils SOURCES ads_globals.cpp ads_globals.h advanceddockingsystemtr.h diff --git a/src/libs/aggregation/CMakeLists.txt b/src/libs/aggregation/CMakeLists.txt index 6871c9ab358..9d45c71c05b 100644 --- a/src/libs/aggregation/CMakeLists.txt +++ b/src/libs/aggregation/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_library(Aggregation - DEPENDS Qt5::Core + DEPENDS Qt::Core SOURCES aggregate.cpp aggregate.h aggregation_global.h diff --git a/src/libs/cplusplus/CMakeLists.txt b/src/libs/cplusplus/CMakeLists.txt index 76cbcbde141..c99a66c1f89 100644 --- a/src/libs/cplusplus/CMakeLists.txt +++ b/src/libs/cplusplus/CMakeLists.txt @@ -1,8 +1,8 @@ -# TODO: Make Qt5::Gui optional -- if really needed that is. +# TODO: Make Qt::Gui optional -- if really needed that is. add_qtc_library(CPlusPlus - DEPENDS Utils Qt5::Concurrent - PUBLIC_DEPENDS 3rd_cplusplus Qt5::Gui + DEPENDS Utils Qt::Concurrent + PUBLIC_DEPENDS 3rd_cplusplus Qt::Gui SOURCES ASTParent.cpp ASTParent.h ASTPath.cpp ASTPath.h diff --git a/src/libs/extensionsystem/CMakeLists.txt b/src/libs/extensionsystem/CMakeLists.txt index bd2f216f5e5..60e60782c58 100644 --- a/src/libs/extensionsystem/CMakeLists.txt +++ b/src/libs/extensionsystem/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_library(ExtensionSystem DEPENDS Aggregation Utils - PUBLIC_DEPENDS Qt5::Core Qt5::Widgets + PUBLIC_DEPENDS Qt::Core Qt::Widgets SOURCES extensionsystem_global.h extensionsystemtr.h @@ -22,7 +22,7 @@ add_qtc_library(ExtensionSystem find_package(Qt5 COMPONENTS Test QUIET) extend_qtc_library(ExtensionSystem - CONDITION TARGET Qt5::Test - DEPENDS Qt5::Test + CONDITION TARGET Qt::Test + DEPENDS Qt::Test DEFINES WITH_TESTS ) diff --git a/src/libs/glsl/CMakeLists.txt b/src/libs/glsl/CMakeLists.txt index e5fcb3692b4..9358de9e573 100644 --- a/src/libs/glsl/CMakeLists.txt +++ b/src/libs/glsl/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_library(GLSL - DEPENDS Qt5::Core + DEPENDS Qt::Core SOURCES glsl.h glslast.cpp glslast.h diff --git a/src/libs/languageutils/CMakeLists.txt b/src/libs/languageutils/CMakeLists.txt index 0cc47e7c60d..725827e1e63 100644 --- a/src/libs/languageutils/CMakeLists.txt +++ b/src/libs/languageutils/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_library(LanguageUtils - PUBLIC_DEPENDS Qt5::Core + PUBLIC_DEPENDS Qt::Core SOURCES componentversion.cpp componentversion.h fakemetaobject.cpp fakemetaobject.h diff --git a/src/libs/modelinglib/CMakeLists.txt b/src/libs/modelinglib/CMakeLists.txt index df50d899950..27801f479a4 100644 --- a/src/libs/modelinglib/CMakeLists.txt +++ b/src/libs/modelinglib/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_library(Modeling - DEPENDS Qt5::Widgets Utils + DEPENDS Qt::Widgets Utils PUBLIC_DEPENDS OptionalSvg INCLUDES qtserialization/inc PUBLIC_INCLUDES diff --git a/src/libs/nanotrace/CMakeLists.txt b/src/libs/nanotrace/CMakeLists.txt index e8c6978c6b4..57f11af9970 100644 --- a/src/libs/nanotrace/CMakeLists.txt +++ b/src/libs/nanotrace/CMakeLists.txt @@ -3,7 +3,7 @@ add_qtc_library(Nanotrace DEFINES NANOTRACE_LIBRARY PUBLIC_DEFINES NANOTRACE_ENABLED SOURCES nanotrace.cpp nanotrace.h - PUBLIC_DEPENDS Qt5::Core + PUBLIC_DEPENDS Qt::Core PROPERTIES CXX_VISIBILITY_PRESET default VISIBILITY_INLINES_HIDDEN OFF diff --git a/src/libs/qmldebug/CMakeLists.txt b/src/libs/qmldebug/CMakeLists.txt index 68d16fa0fdd..02cb5cfa48a 100644 --- a/src/libs/qmldebug/CMakeLists.txt +++ b/src/libs/qmldebug/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_library(QmlDebug - DEPENDS Qt5::Network Utils + DEPENDS Qt::Network Utils SOURCES baseenginedebugclient.cpp baseenginedebugclient.h basetoolsclient.cpp basetoolsclient.h diff --git a/src/libs/qmleditorwidgets/CMakeLists.txt b/src/libs/qmleditorwidgets/CMakeLists.txt index 3023f54e202..7157b430f40 100644 --- a/src/libs/qmleditorwidgets/CMakeLists.txt +++ b/src/libs/qmleditorwidgets/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_library(QmlEditorWidgets - DEPENDS QmlJS Utils Qt5::Widgets + DEPENDS QmlJS Utils Qt::Widgets SOURCES colorbox.cpp colorbox.h colorbutton.cpp colorbutton.h diff --git a/src/libs/qmljs/CMakeLists.txt b/src/libs/qmljs/CMakeLists.txt index 6db8d917acc..d166e666e74 100644 --- a/src/libs/qmljs/CMakeLists.txt +++ b/src/libs/qmljs/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_library(QmlJS - DEPENDS ExtensionSystem Utils Qt5::Xml - PUBLIC_DEPENDS CPlusPlus Qt5::Widgets LanguageUtils + DEPENDS ExtensionSystem Utils Qt::Xml + PUBLIC_DEPENDS CPlusPlus Qt::Widgets LanguageUtils SOURCES jsoncheck.cpp jsoncheck.h parser/qmldirparser.cpp parser/qmldirparser_p.h diff --git a/src/libs/qmlpuppetcommunication/QmlPuppetCommunication.cmake b/src/libs/qmlpuppetcommunication/QmlPuppetCommunication.cmake index 3d61bd6606f..2858a39fa9a 100644 --- a/src/libs/qmlpuppetcommunication/QmlPuppetCommunication.cmake +++ b/src/libs/qmlpuppetcommunication/QmlPuppetCommunication.cmake @@ -1,6 +1,6 @@ add_qtc_library(QmlPuppetCommunication STATIC PROPERTIES AUTOUIC OFF - DEPENDS Qt5::Core Qt5::CorePrivate Qt5::Gui + DEPENDS Qt::Core Qt::CorePrivate Qt::Gui ) extend_qtc_library(QmlPuppetCommunication diff --git a/src/libs/sqlite/CMakeLists.txt b/src/libs/sqlite/CMakeLists.txt index 9e615420a61..5f0d073813f 100644 --- a/src/libs/sqlite/CMakeLists.txt +++ b/src/libs/sqlite/CMakeLists.txt @@ -14,7 +14,7 @@ add_qtc_library(SqliteC OBJECT add_qtc_library(Sqlite PROPERTIES AUTOMOC OFF AUTOUIC OFF - DEPENDS Qt5::Core Threads::Threads ${CMAKE_DL_LIBS} SqliteC + DEPENDS Qt::Core Threads::Threads ${CMAKE_DL_LIBS} SqliteC CONDITION Qt5_VERSION VERSION_GREATER_EQUAL 6.2.0 PUBLIC_INCLUDES "${CMAKE_CURRENT_LIST_DIR}" diff --git a/src/libs/tracing/CMakeLists.txt b/src/libs/tracing/CMakeLists.txt index c7f59798198..3e0a7237f6c 100644 --- a/src/libs/tracing/CMakeLists.txt +++ b/src/libs/tracing/CMakeLists.txt @@ -36,10 +36,10 @@ set(TRACING_CPP_SOURCES find_package(Qt6 COMPONENTS ShaderTools QUIET) add_qtc_library(Tracing - CONDITION TARGET Qt6::ShaderTools AND TARGET Qt5::Quick + CONDITION TARGET Qt6::ShaderTools AND TARGET Qt::Quick FEATURE_INFO - DEPENDS Utils Qt5::Quick - PUBLIC_DEPENDS Qt5::Widgets Qt5::Qml + DEPENDS Utils Qt::Quick + PUBLIC_DEPENDS Qt::Widgets Qt::Qml SOURCES ${TEST_SOURCES} ) diff --git a/src/libs/utils/CMakeLists.txt b/src/libs/utils/CMakeLists.txt index 0eccb86f0bd..71eb7008be0 100644 --- a/src/libs/utils/CMakeLists.txt +++ b/src/libs/utils/CMakeLists.txt @@ -1,7 +1,7 @@ add_qtc_library(Utils - DEPENDS Qt5::Qml Qt5::Xml + DEPENDS Qt::Qml Qt::Xml PUBLIC_DEPENDS - Qt5::Concurrent Qt5::Core Qt5::Network Qt5::Gui Qt5::Widgets + Qt::Concurrent Qt::Core Qt::Network Qt::Gui Qt::Widgets Qt6Core5Compat SOURCES ../3rdparty/span/span.hpp @@ -254,8 +254,8 @@ extend_qtc_library(Utils CONDITION UNIX AND NOT APPLE ) extend_qtc_library(Utils - CONDITION TARGET Qt5::CorePrivate - DEPENDS Qt5::CorePrivate + CONDITION TARGET Qt::CorePrivate + DEPENDS Qt::CorePrivate DEFINES QTC_UTILS_WITH_FSENGINE SOURCES fsengine/fsengine_impl.cpp fsengine/fsengine_impl.h diff --git a/src/plugins/android/CMakeLists.txt b/src/plugins/android/CMakeLists.txt index 45b9520cee2..e58c4698a53 100644 --- a/src/plugins/android/CMakeLists.txt +++ b/src/plugins/android/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(Android - DEPENDS QmlDebug Qt5::Xml LanguageServerProtocol + DEPENDS QmlDebug Qt::Xml LanguageServerProtocol PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport LanguageClient SOURCES android.qrc diff --git a/src/plugins/beautifier/CMakeLists.txt b/src/plugins/beautifier/CMakeLists.txt index aa8174ba394..7d18a27a591 100644 --- a/src/plugins/beautifier/CMakeLists.txt +++ b/src/plugins/beautifier/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(Beautifier - DEPENDS Qt5::Xml + DEPENDS Qt::Xml PLUGIN_DEPENDS Core ProjectExplorer TextEditor SOURCES abstractsettings.cpp abstractsettings.h diff --git a/src/plugins/boot2qt/CMakeLists.txt b/src/plugins/boot2qt/CMakeLists.txt index 9713dc5b7ec..627b7b6d3b6 100644 --- a/src/plugins/boot2qt/CMakeLists.txt +++ b/src/plugins/boot2qt/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_plugin(Boot2Qt PLUGIN_CLASS QdbPlugin - DEPENDS Qt5::Network + DEPENDS Qt::Network PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport RemoteLinux SOURCES qdb.qrc diff --git a/src/plugins/clangformat/CMakeLists.txt b/src/plugins/clangformat/CMakeLists.txt index fb8f515dcf0..19014d22fe5 100644 --- a/src/plugins/clangformat/CMakeLists.txt +++ b/src/plugins/clangformat/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_plugin(ClangFormat CONDITION TARGET ${CLANG_FORMAT_LIB} AND LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL 10.0.0 AND (QTC_CLANG_BUILDMODE_MATCH OR CLANGTOOLING_LINK_CLANG_DYLIB) - DEPENDS Utils Qt5::Widgets ${CLANG_FORMAT_LIB} + DEPENDS Utils Qt::Widgets ${CLANG_FORMAT_LIB} PLUGIN_DEPENDS Core TextEditor CppEditor ProjectExplorer SOURCES clangformatbaseindenter.cpp clangformatbaseindenter.h diff --git a/src/plugins/clangtools/unit-tests/exported-diagnostics/CMakeLists.txt b/src/plugins/clangtools/unit-tests/exported-diagnostics/CMakeLists.txt index cccf51f4929..30efc996911 100644 --- a/src/plugins/clangtools/unit-tests/exported-diagnostics/CMakeLists.txt +++ b/src/plugins/clangtools/unit-tests/exported-diagnostics/CMakeLists.txt @@ -20,4 +20,4 @@ add_executable(clangtools tidy.modernize-use-nullptr.cpp ) -target_link_libraries(clangtools PRIVATE Qt5::Widgets) +target_link_libraries(clangtools PRIVATE Qt::Widgets) diff --git a/src/plugins/coreplugin/CMakeLists.txt b/src/plugins/coreplugin/CMakeLists.txt index 27ad0bfefde..a63c25311d0 100644 --- a/src/plugins/coreplugin/CMakeLists.txt +++ b/src/plugins/coreplugin/CMakeLists.txt @@ -4,7 +4,7 @@ endif() configure_file(core_logo.qrc.cmakein core_logo_cmake.qrc) add_qtc_plugin(Core - DEPENDS Qt5::PrintSupport Qt5::Qml Qt5::Sql Qt5::Gui Qt5::GuiPrivate + DEPENDS Qt::PrintSupport Qt::Qml Qt::Sql Qt::Gui Qt::GuiPrivate PUBLIC_DEPENDS Aggregation ExtensionSystem Utils app_version SOURCES actionmanager/actioncontainer.cpp actionmanager/actioncontainer.h actionmanager/actioncontainer_p.h diff --git a/src/plugins/cpaster/CMakeLists.txt b/src/plugins/cpaster/CMakeLists.txt index 6e201f77c10..da48a556885 100644 --- a/src/plugins/cpaster/CMakeLists.txt +++ b/src/plugins/cpaster/CMakeLists.txt @@ -3,7 +3,7 @@ add_subdirectory(frontend) add_qtc_plugin(CodePaster PLUGIN_DEPENDS Core TextEditor DEFINES CPASTER_PLUGIN_GUI - DEPENDS Qt5::Network + DEPENDS Qt::Network INCLUDES ../../shared/cpaster SOURCES codepasterservice.h diff --git a/src/plugins/cpaster/frontend/CMakeLists.txt b/src/plugins/cpaster/frontend/CMakeLists.txt index 58468f63d1b..3024648b8dd 100644 --- a/src/plugins/cpaster/frontend/CMakeLists.txt +++ b/src/plugins/cpaster/frontend/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_executable(cpaster - DEPENDS Core Utils Qt5::Network + DEPENDS Core Utils Qt::Network SOURCES argumentscollector.cpp argumentscollector.h main.cpp diff --git a/src/plugins/cppcheck/CMakeLists.txt b/src/plugins/cppcheck/CMakeLists.txt index 9a5234313fc..dc9bbb0661e 100644 --- a/src/plugins/cppcheck/CMakeLists.txt +++ b/src/plugins/cppcheck/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(Cppcheck - DEPENDS Qt5::Widgets + DEPENDS Qt::Widgets PLUGIN_DEPENDS Core Debugger CppEditor ProjectExplorer TextEditor SOURCES cppcheckconstants.h diff --git a/src/plugins/cppeditor/CMakeLists.txt b/src/plugins/cppeditor/CMakeLists.txt index 9c8a240c084..a837db67f1c 100644 --- a/src/plugins/cppeditor/CMakeLists.txt +++ b/src/plugins/cppeditor/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_plugin(CppEditor - DEPENDS Qt5::Network Qt5::Xml - PUBLIC_DEPENDS CPlusPlus Qt5::Widgets + DEPENDS Qt::Network Qt::Xml + PUBLIC_DEPENDS CPlusPlus Qt::Widgets PLUGIN_DEPENDS Core ProjectExplorer TextEditor PLUGIN_TEST_DEPENDS QbsProjectManager QmakeProjectManager SOURCES diff --git a/src/plugins/ctfvisualizer/CMakeLists.txt b/src/plugins/ctfvisualizer/CMakeLists.txt index 1b4df7f2fa2..8ba905d5f3b 100644 --- a/src/plugins/ctfvisualizer/CMakeLists.txt +++ b/src/plugins/ctfvisualizer/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_plugin(CtfVisualizer CONDITION TARGET Tracing - DEPENDS Tracing Qt5::QuickWidgets + DEPENDS Tracing Qt::QuickWidgets INCLUDES ${PROJECT_SOURCE_DIR}/src PLUGIN_DEPENDS Core Debugger ProjectExplorer SOURCES diff --git a/src/plugins/designer/CMakeLists.txt b/src/plugins/designer/CMakeLists.txt index 7c78ce7d8e8..909e2df6d1b 100644 --- a/src/plugins/designer/CMakeLists.txt +++ b/src/plugins/designer/CMakeLists.txt @@ -1,8 +1,8 @@ add_qtc_plugin(Designer PLUGIN_CLASS FormEditorPlugin - CONDITION TARGET Qt5::DesignerComponents AND TARGET Qt5::Designer + CONDITION TARGET Qt::DesignerComponents AND TARGET Qt::Designer DEPENDS designerintegrationv2 - Qt5::Designer Qt5::PrintSupport Qt5::DesignerComponents + Qt::Designer Qt::PrintSupport Qt::DesignerComponents DEFINES CPP_ENABLED PLUGIN_DEPENDS Core CppEditor ProjectExplorer QtSupport ResourceEditor TextEditor PLUGIN_TEST_DEPENDS CppEditor @@ -33,12 +33,14 @@ add_qtc_plugin(Designer ) extend_qtc_plugin(Designer - CONDITION WITH_TESTS AND TARGET Qt5::DesignerComponents AND TARGET Qt5::Designer + CONDITION WITH_TESTS AND TARGET Qt::DesignerComponents AND TARGET Qt::Designer SOURCES gotoslot_test.cpp ) if (QTC_STATIC_BUILD AND TARGET Designer) - get_target_property(_designerType Qt5::Designer TYPE) + # version-less target Qt::Designer is an interface library that links to QtX::Designer + get_target_property(_designer Qt::Designer INTERFACE_LINK_LIBRARIES) + get_target_property(_designerType ${_designer} TYPE) if (${_designerType} STREQUAL "STATIC_LIBRARY") extend_qtc_target(Designer PUBLIC_DEFINES QT_DESIGNER_STATIC) endif() diff --git a/src/plugins/help/CMakeLists.txt b/src/plugins/help/CMakeLists.txt index 41dac7e5622..76a680c7595 100644 --- a/src/plugins/help/CMakeLists.txt +++ b/src/plugins/help/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(Help - CONDITION TARGET Qt5::Help + CONDITION TARGET Qt::Help DEPENDS shared_help PLUGIN_DEPENDS Core ProjectExplorer PLUGIN_RECOMMENDS TextEditor @@ -48,9 +48,9 @@ extend_qtc_plugin(Help option(BUILD_HELPVIEWERBACKEND_QTWEBENGINE "Build QtWebEngine based help viewer backend." YES) find_package(Qt5 COMPONENTS WebEngineWidgets QUIET) extend_qtc_plugin(Help - CONDITION BUILD_HELPVIEWERBACKEND_QTWEBENGINE AND TARGET Qt5::WebEngineWidgets + CONDITION BUILD_HELPVIEWERBACKEND_QTWEBENGINE AND TARGET Qt::WebEngineWidgets FEATURE_INFO "QtWebEngine help viewer" - DEPENDS Qt5::WebEngineWidgets + DEPENDS Qt::WebEngineWidgets DEFINES QTC_WEBENGINE_HELPVIEWER SOURCES webenginehelpviewer.cpp diff --git a/src/plugins/imageviewer/CMakeLists.txt b/src/plugins/imageviewer/CMakeLists.txt index f708c9d5186..5c6f0ca98b6 100644 --- a/src/plugins/imageviewer/CMakeLists.txt +++ b/src/plugins/imageviewer/CMakeLists.txt @@ -1,6 +1,6 @@ find_package(Qt5 COMPONENTS SvgWidgets QUIET) -if (TARGET Qt5::SvgWidgets) - set(SVG_WIDGETS Qt5::SvgWidgets) +if (TARGET Qt::SvgWidgets) + set(SVG_WIDGETS Qt::SvgWidgets) endif() add_qtc_plugin(ImageViewer diff --git a/src/plugins/ios/CMakeLists.txt b/src/plugins/ios/CMakeLists.txt index 3e7d68a8458..5f4abd1913c 100644 --- a/src/plugins/ios/CMakeLists.txt +++ b/src/plugins/ios/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(Ios - DEPENDS QmlDebug Qt5::Xml + DEPENDS QmlDebug Qt::Xml PLUGIN_DEPENDS Core Debugger ProjectExplorer QmakeProjectManager CMakeProjectManager SOURCES createsimulatordialog.cpp createsimulatordialog.h diff --git a/src/plugins/languageclient/CMakeLists.txt b/src/plugins/languageclient/CMakeLists.txt index cc7d2c310c4..42dde24dba1 100644 --- a/src/plugins/languageclient/CMakeLists.txt +++ b/src/plugins/languageclient/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(LanguageClient - PUBLIC_DEPENDS LanguageServerProtocol Qt5::Core app_version + PUBLIC_DEPENDS LanguageServerProtocol Qt::Core app_version PLUGIN_DEPENDS ProjectExplorer Core TextEditor SOURCES client.cpp client.h diff --git a/src/plugins/mcusupport/CMakeLists.txt b/src/plugins/mcusupport/CMakeLists.txt index 27cd018be0e..57b12dd1b04 100644 --- a/src/plugins/mcusupport/CMakeLists.txt +++ b/src/plugins/mcusupport/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(McuSupport - DEPENDS Qt5::Core + DEPENDS Qt::Core PLUGIN_DEPENDS Core BareMetal ProjectExplorer Debugger CMakeProjectManager QtSupport SOURCES mcukitinformation.cpp mcukitinformation.h diff --git a/src/plugins/mesonprojectmanager/CMakeLists.txt b/src/plugins/mesonprojectmanager/CMakeLists.txt index ebb2f4f8621..62f4b231ee8 100644 --- a/src/plugins/mesonprojectmanager/CMakeLists.txt +++ b/src/plugins/mesonprojectmanager/CMakeLists.txt @@ -92,7 +92,7 @@ add_qtc_test(tst_mesonwrapper INCLUDES BEFORE "." DEPENDS - Qt5::Core Qt5::Test Core + Qt::Core Qt::Test Core Utils DEFINES MESON_SAMPLES_DIR="${CMAKE_CURRENT_SOURCE_DIR}/tests/resources" @@ -113,7 +113,7 @@ add_qtc_test(tst_mesoninfoparser INCLUDES BEFORE "." DEPENDS - Qt5::Core Qt5::Test Core + Qt::Core Qt::Test Core Utils DEFINES MESON_SAMPLES_DIR="${CMAKE_CURRENT_SOURCE_DIR}/tests/resources" @@ -134,7 +134,7 @@ add_qtc_test(tst_ninjaparser INCLUDES BEFORE "." DEPENDS - Qt5::Core Qt5::Test Core + Qt::Core Qt::Test Core Utils ProjectExplorer SOURCES tests/testninjaparser.cpp @@ -147,7 +147,7 @@ add_qtc_test(tst_mesonparser DEFINES MESONPARSER_DISABLE_TASKS_FOR_TESTS DEPENDS - Qt5::Core Qt5::Test Core + Qt::Core Qt::Test Core Utils ProjectExplorer SOURCES tests/testmesonparser.cpp diff --git a/src/plugins/modeleditor/CMakeLists.txt b/src/plugins/modeleditor/CMakeLists.txt index 0b4b687eb43..bb21d68692f 100644 --- a/src/plugins/modeleditor/CMakeLists.txt +++ b/src/plugins/modeleditor/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(ModelEditor - DEPENDS Modeling Qt5::Core Qt5::Gui Qt5::Widgets + DEPENDS Modeling Qt::Core Qt::Gui Qt::Widgets PLUGIN_DEPENDS Core CppEditor ProjectExplorer SOURCES actionhandler.cpp actionhandler.h diff --git a/src/plugins/perfprofiler/CMakeLists.txt b/src/plugins/perfprofiler/CMakeLists.txt index 9204f18fd19..b7ae8e6c9cf 100644 --- a/src/plugins/perfprofiler/CMakeLists.txt +++ b/src/plugins/perfprofiler/CMakeLists.txt @@ -41,7 +41,7 @@ set(PERFPROFILER_CPP_SOURCES add_qtc_plugin(PerfProfiler CONDITION TARGET Tracing - DEPENDS Tracing Qt5::QuickWidgets + DEPENDS Tracing Qt::QuickWidgets PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport SOURCES ${TEST_SOURCES} diff --git a/src/plugins/projectexplorer/CMakeLists.txt b/src/plugins/projectexplorer/CMakeLists.txt index 35a3e6114a6..0cb06abaee3 100644 --- a/src/plugins/projectexplorer/CMakeLists.txt +++ b/src/plugins/projectexplorer/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(ProjectExplorer - DEPENDS Qt5::Qml + DEPENDS Qt::Qml PLUGIN_DEPENDS Core TextEditor PLUGIN_TEST_DEPENDS GenericProjectManager SOURCES diff --git a/src/plugins/qbsprojectmanager/CMakeLists.txt b/src/plugins/qbsprojectmanager/CMakeLists.txt index 8fcc680abae..885edbf0bf7 100644 --- a/src/plugins/qbsprojectmanager/CMakeLists.txt +++ b/src/plugins/qbsprojectmanager/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(QbsProjectManager - DEPENDS Qt5::Qml Qt5::Widgets QmlJS + DEPENDS Qt::Qml Qt::Widgets QmlJS DEFINES IDE_LIBRARY_BASENAME="${IDE_LIBRARY_BASE_PATH}" PLUGIN_DEPENDS Core ProjectExplorer CppEditor QtSupport QmlJSTools diff --git a/src/plugins/qmldesigner/CMakeLists.txt b/src/plugins/qmldesigner/CMakeLists.txt index e599ba8ecd5..3916a55929c 100644 --- a/src/plugins/qmldesigner/CMakeLists.txt +++ b/src/plugins/qmldesigner/CMakeLists.txt @@ -1,8 +1,8 @@ add_qtc_plugin(QmlDesigner - CONDITION Qt5_VERSION VERSION_GREATER_EQUAL 6.2.0 AND TARGET Qt5::QuickWidgets AND TARGET Qt5::Svg + CONDITION Qt5_VERSION VERSION_GREATER_EQUAL 6.2.0 AND TARGET Qt::QuickWidgets AND TARGET Qt::Svg DEPENDS QmlJS LanguageUtils QmlEditorWidgets AdvancedDockingSystem - Qt5::QuickWidgets Qt5::CorePrivate Sqlite Qt5::Xml Qt5::Svg + Qt::QuickWidgets Qt::CorePrivate Sqlite Qt::Xml Qt::Svg PLUGIN_DEPENDS Core ProjectExplorer QmlJSEditor QmlProjectManager QtSupport @@ -29,7 +29,7 @@ add_feature_info("Build with QmlDom" ${WITH_QMLDOM} "") add_qtc_library(QmlDesignerUtils STATIC DEPENDS - Qt5::Gui + Qt::Gui DEFINES QMLDESIGNERUTILS_LIBRARY PUBLIC_DEFINES $<$:QMLDESIGNER_STATIC_LIBRARY> PUBLIC_INCLUDES ${CMAKE_CURRENT_LIST_DIR}/utils @@ -45,11 +45,11 @@ add_qtc_library(QmlDesignerUtils STATIC add_qtc_library(QmlDesignerCore STATIC DEPENDS Threads::Threads - Qt5::CorePrivate + Qt::CorePrivate CPlusPlus Utils - Qt5::Widgets - Qt5::Qml + Qt::Widgets + Qt::Qml Core ProjectExplorer QmakeProjectManager @@ -524,17 +524,13 @@ endif() if (QTC_STATIC_BUILD AND TARGET QmlDesigner) - 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 + DEPENDS Core ProjectExplorer QmlDesigner Utils Qt::Qml Qt::QuickPrivate PUBLIC_INCLUDES assetexporterplugin SOURCES assetexporterplugin/assetexportdialog.h assetexporterplugin/assetexportdialog.cpp assetexporterplugin/assetexportdialog.ui @@ -556,7 +552,7 @@ add_qtc_plugin(assetexporterplugin add_qtc_plugin(componentsplugin PLUGIN_CLASS ComponentsPlugin CONDITION TARGET QmlDesigner - DEPENDS Core QmlDesigner Utils Qt5::Qml + DEPENDS Core QmlDesigner Utils Qt::Qml DEFINES COMPONENTS_LIBRARY SOURCES componentsplugin/addtabdesigneraction.cpp componentsplugin/addtabdesigneraction.h @@ -572,7 +568,7 @@ add_qtc_plugin(componentsplugin add_qtc_plugin(qmlpreviewplugin PLUGIN_CLASS QmlPreviewWidgetPlugin CONDITION TARGET QmlDesigner - DEPENDS Core ProjectExplorer QmlDesigner Utils Qt5::Qml + DEPENDS Core ProjectExplorer QmlDesigner Utils Qt::Qml SOURCES qmlpreviewplugin/qmlpreviewactions.cpp qmlpreviewplugin/qmlpreviewactions.h qmlpreviewplugin/qmlpreviewplugin.cpp qmlpreviewplugin/qmlpreviewplugin.h @@ -583,7 +579,7 @@ add_qtc_plugin(qmlpreviewplugin add_qtc_plugin(qtquickplugin PLUGIN_CLASS QtQuickPlugin CONDITION TARGET QmlDesigner - DEPENDS Core QmlDesigner Utils Qt5::Qml + DEPENDS Core QmlDesigner Utils Qt::Qml DEFINES QTQUICK_LIBRARY SOURCES qtquickplugin/qtquickplugin.cpp qtquickplugin/qtquickplugin.h diff --git a/src/plugins/qmlpreview/CMakeLists.txt b/src/plugins/qmlpreview/CMakeLists.txt index 06eb01fed48..438068e19b0 100644 --- a/src/plugins/qmlpreview/CMakeLists.txt +++ b/src/plugins/qmlpreview/CMakeLists.txt @@ -38,7 +38,7 @@ if(TARGET Qt${QT_VERSION_MAJOR}::QmlPrivate) ) extend_qtc_plugin(QmlPreview CONDITION have_qml_debug_translation_protocol - PUBLIC_DEPENDS Qt5::QmlPrivate + PUBLIC_DEPENDS Qt::QmlPrivate PUBLIC_DEFINES "FOUND_QML_DEBUG_TRANSLATION_PROTOCOL" ) endif() diff --git a/src/plugins/qmlprofiler/CMakeLists.txt b/src/plugins/qmlprofiler/CMakeLists.txt index 937134b7a39..ddf4ae63b05 100644 --- a/src/plugins/qmlprofiler/CMakeLists.txt +++ b/src/plugins/qmlprofiler/CMakeLists.txt @@ -77,7 +77,7 @@ find_package(Qt6 COMPONENTS ShaderTools QUIET) add_qtc_plugin(QmlProfiler CONDITION TARGET Tracing AND TARGET Qt6::ShaderTools - DEPENDS QmlDebug QmlJS Tracing Qt5::QuickWidgets + DEPENDS QmlDebug QmlJS Tracing Qt::QuickWidgets PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport TextEditor SOURCES ${TEST_SOURCES} diff --git a/src/plugins/qmlprojectmanager/CMakeLists.txt b/src/plugins/qmlprojectmanager/CMakeLists.txt index 64dec0f86b9..7d3aa4c10d5 100644 --- a/src/plugins/qmlprojectmanager/CMakeLists.txt +++ b/src/plugins/qmlprojectmanager/CMakeLists.txt @@ -1,7 +1,7 @@ add_qtc_plugin(QmlProjectManager - CONDITION TARGET Qt5::QuickWidgets + CONDITION TARGET Qt::QuickWidgets PLUGIN_CLASS QmlProjectPlugin - DEPENDS QmlJS Qt5::QuickWidgets + DEPENDS QmlJS Qt::QuickWidgets PLUGIN_DEPENDS Core ProjectExplorer QtSupport SOURCES fileformat/filefilteritems.cpp fileformat/filefilteritems.h diff --git a/src/plugins/qnx/CMakeLists.txt b/src/plugins/qnx/CMakeLists.txt index aca75bc578f..56acc26a3a0 100644 --- a/src/plugins/qnx/CMakeLists.txt +++ b/src/plugins/qnx/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(Qnx - DEPENDS QmlDebug Qt5::Xml + DEPENDS QmlDebug Qt::Xml PLUGIN_DEPENDS Core Debugger ProjectExplorer QtSupport RemoteLinux SOURCES qnx.qrc diff --git a/src/plugins/qtsupport/CMakeLists.txt b/src/plugins/qtsupport/CMakeLists.txt index afe14575d0e..0699d3d87c1 100644 --- a/src/plugins/qtsupport/CMakeLists.txt +++ b/src/plugins/qtsupport/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(QtSupport - DEPENDS Qt5::Xml + DEPENDS Qt::Xml PUBLIC_DEPENDS ProParser PLUGIN_DEPENDS Core ProjectExplorer ResourceEditor SOURCES diff --git a/src/plugins/resourceeditor/CMakeLists.txt b/src/plugins/resourceeditor/CMakeLists.txt index 6cfd11bee11..1db8386ff0b 100644 --- a/src/plugins/resourceeditor/CMakeLists.txt +++ b/src/plugins/resourceeditor/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(ResourceEditor - DEPENDS Qt5::Xml + DEPENDS Qt::Xml PLUGIN_DEPENDS Core ProjectExplorer SOURCES qrceditor/qrceditor.cpp qrceditor/qrceditor.h diff --git a/src/plugins/serialterminal/CMakeLists.txt b/src/plugins/serialterminal/CMakeLists.txt index 79bbddb219e..dc801e4af42 100644 --- a/src/plugins/serialterminal/CMakeLists.txt +++ b/src/plugins/serialterminal/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_plugin(SerialTerminal - CONDITION TARGET Qt5::SerialPort - DEPENDS Qt5::SerialPort + CONDITION TARGET Qt::SerialPort + DEPENDS Qt::SerialPort PLUGIN_DEPENDS Core TextEditor SOURCES consolelineedit.cpp consolelineedit.h diff --git a/src/plugins/studiowelcome/CMakeLists.txt b/src/plugins/studiowelcome/CMakeLists.txt index 5550dc20034..74c8315507a 100644 --- a/src/plugins/studiowelcome/CMakeLists.txt +++ b/src/plugins/studiowelcome/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_plugin(StudioWelcome - CONDITION TARGET Qt5::QuickWidgets AND TARGET QmlDesigner - DEPENDS Qt5::QuickWidgets Qt5::QmlPrivate + CONDITION TARGET Qt::QuickWidgets AND TARGET QmlDesigner + DEPENDS Qt::QuickWidgets Qt::QmlPrivate PLUGIN_DEPENDS Core ProjectExplorer QtSupport QmlDesigner DEFINES STUDIO_QML_PATH="${CMAKE_CURRENT_SOURCE_DIR}/qml/" SOURCES diff --git a/src/plugins/texteditor/CMakeLists.txt b/src/plugins/texteditor/CMakeLists.txt index 8a103da318d..01636fe7544 100644 --- a/src/plugins/texteditor/CMakeLists.txt +++ b/src/plugins/texteditor/CMakeLists.txt @@ -5,7 +5,7 @@ else() endif() add_qtc_plugin(TextEditor - DEPENDS Qt5::Concurrent Qt5::Network Qt5::PrintSupport Qt5::Xml + DEPENDS Qt::Concurrent Qt::Network Qt::PrintSupport Qt::Xml PUBLIC_DEPENDS ${KSYNTAXHIGHLIGHTING_TARGET} PLUGIN_DEPENDS Core SOURCES diff --git a/src/plugins/updateinfo/CMakeLists.txt b/src/plugins/updateinfo/CMakeLists.txt index e6b58ede2ac..2507f99964b 100644 --- a/src/plugins/updateinfo/CMakeLists.txt +++ b/src/plugins/updateinfo/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(UpdateInfo - DEPENDS Qt5::Xml + DEPENDS Qt::Xml PLUGIN_DEPENDS Core PLUGIN_JSON_IN UPDATEINFO_EXPERIMENTAL_STR=true SOURCES diff --git a/src/plugins/webassembly/CMakeLists.txt b/src/plugins/webassembly/CMakeLists.txt index b58bcbb355b..7bbca8877a4 100644 --- a/src/plugins/webassembly/CMakeLists.txt +++ b/src/plugins/webassembly/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_plugin(WebAssembly - DEPENDS Qt5::Core + DEPENDS Qt::Core PLUGIN_DEPENDS Core ProjectExplorer QtSupport SOURCES webassembly.qrc diff --git a/src/shared/designerintegrationv2/CMakeLists.txt b/src/shared/designerintegrationv2/CMakeLists.txt index e600141bce1..8319c028ce0 100644 --- a/src/shared/designerintegrationv2/CMakeLists.txt +++ b/src/shared/designerintegrationv2/CMakeLists.txt @@ -1,9 +1,9 @@ -if (NOT TARGET Qt5::Designer) +if (NOT TARGET Qt::Designer) return() endif() add_qtc_library(designerintegrationv2 STATIC - DEPENDS Qt5::Designer Qt5::Widgets + DEPENDS Qt::Designer Qt::Widgets PUBLIC_INCLUDES "${CMAKE_CURRENT_LIST_DIR}" SOURCES @@ -14,7 +14,9 @@ add_qtc_library(designerintegrationv2 STATIC ) if (QTC_STATIC_BUILD) - get_target_property(_designerType Qt5::Designer TYPE) + # version-less target Qt::Designer is an interface library that links to QtX::Designer + get_target_property(_designer Qt::Designer INTERFACE_LINK_LIBRARIES) + get_target_property(_designerType ${_designer} TYPE) if (${_designerType} STREQUAL "STATIC_LIBRARY") extend_qtc_target(designerintegrationv2 PUBLIC_DEFINES QT_DESIGNER_STATIC) endif() diff --git a/src/shared/help/CMakeLists.txt b/src/shared/help/CMakeLists.txt index d63f5bbb773..e330fdd23a9 100644 --- a/src/shared/help/CMakeLists.txt +++ b/src/shared/help/CMakeLists.txt @@ -1,5 +1,5 @@ -if (NOT TARGET Qt5::Help) - # Do not built without Qt5::Help being available +if (NOT TARGET Qt::Help) + # Do not built without Qt::Help being available return() endif() @@ -12,7 +12,7 @@ if (isMultiConfig) endif() add_qtc_library(shared_help STATIC - DEPENDS Utils Core PUBLIC Qt5::Help Qt5::PrintSupport Qt5::Widgets + DEPENDS Utils Core PUBLIC Qt::Help Qt::PrintSupport Qt::Widgets PUBLIC_INCLUDES "${PLUGIN_SOURCE_DIR}/help" "${PLUGIN_SOURCE_DIR}" diff --git a/src/shared/proparser/CMakeLists.txt b/src/shared/proparser/CMakeLists.txt index 0277795a603..0a6d5ca5bb3 100644 --- a/src/shared/proparser/CMakeLists.txt +++ b/src/shared/proparser/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_library(ProParser - DEPENDS Qt5::Core Utils + DEPENDS Qt::Core Utils PUBLIC_DEFINES QMAKE_BUILTIN_PRFS QMAKE_OVERRIDE_PRFS PROPARSER_THREAD_SAFE PROEVALUATOR_CUMULATIVE PROEVALUATOR_DUAL_VFS diff --git a/src/shared/qtlockedfile/CMakeLists.txt b/src/shared/qtlockedfile/CMakeLists.txt index aafb38497ff..f7f8a1c6662 100644 --- a/src/shared/qtlockedfile/CMakeLists.txt +++ b/src/shared/qtlockedfile/CMakeLists.txt @@ -5,7 +5,7 @@ else() endif() add_library(shared_qtlockedfile STATIC ${OS_SOURCES} qtlockedfile.cpp qtlockedfile.h) -target_link_libraries(shared_qtlockedfile Qt5::Core) +target_link_libraries(shared_qtlockedfile Qt::Core) target_include_directories(shared_qtlockedfile PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") if (WIN32) target_compile_definitions(shared_qtlockedfile PRIVATE diff --git a/src/shared/qtsingleapplication/CMakeLists.txt b/src/shared/qtsingleapplication/CMakeLists.txt index b60ee27f94c..fae6a085454 100644 --- a/src/shared/qtsingleapplication/CMakeLists.txt +++ b/src/shared/qtsingleapplication/CMakeLists.txt @@ -2,7 +2,7 @@ add_library(shared_qtsingleapplication STATIC qtsingleapplication.cpp qtsingleapplication.h qtlocalpeer.cpp qtlocalpeer.h ) -target_link_libraries(shared_qtsingleapplication shared_qtlockedfile Qt5::Core Qt5::Network Qt5::Widgets) +target_link_libraries(shared_qtsingleapplication shared_qtlockedfile Qt::Core Qt::Network Qt::Widgets) target_include_directories(shared_qtsingleapplication PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") if (WIN32) target_compile_definitions(shared_qtsingleapplication PRIVATE "QT_QTSINGLEAPPLICATION_EXPORT=__declspec(dllexport)") diff --git a/src/shared/registryaccess/CMakeLists.txt b/src/shared/registryaccess/CMakeLists.txt index 1a7d190cf52..135df2c501f 100644 --- a/src/shared/registryaccess/CMakeLists.txt +++ b/src/shared/registryaccess/CMakeLists.txt @@ -1,6 +1,6 @@ if (WIN32) add_library(registryaccess STATIC registryaccess.cpp registryaccess.h) - target_link_libraries(registryaccess PUBLIC advapi32 ole32 shell32 Qt5::Widgets) + target_link_libraries(registryaccess PUBLIC advapi32 ole32 shell32 Qt::Widgets) target_compile_definitions(registryaccess PRIVATE _UNICODE UNICODE) target_include_directories(registryaccess PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) else() diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index 98b5a94d957..1bee7cccfbc 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -8,7 +8,7 @@ function(add_qtc_cpp_tool name) DEFINES PATH_PREPROCESSOR_CONFIG=\"${CMAKE_CURRENT_SOURCE_DIR}/cplusplus-shared/pp-configuration.inc\" ${ARGN} - DEPENDS CPlusPlus Utils Qt5::Widgets + DEPENDS CPlusPlus Utils Qt::Widgets INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/cplusplus-shared" "${CMAKE_CURRENT_SOURCE_DIR}/${name}" SOURCES diff --git a/src/tools/iostool/CMakeLists.txt b/src/tools/iostool/CMakeLists.txt index bf9641108dd..acc6dda739c 100644 --- a/src/tools/iostool/CMakeLists.txt +++ b/src/tools/iostool/CMakeLists.txt @@ -1,9 +1,9 @@ add_qtc_executable(iostool DESTINATION ${IDE_LIBEXEC_PATH}/ios DEPENDS - Qt5::Core - Qt5::Xml - Qt5::Network + Qt::Core + Qt::Xml + Qt::Network ${FWCoreFoundation} ${FWCoreServices} ${FWIOKit} diff --git a/src/tools/processlauncher/CMakeLists.txt b/src/tools/processlauncher/CMakeLists.txt index 6efcafbc005..9360d1e9f65 100644 --- a/src/tools/processlauncher/CMakeLists.txt +++ b/src/tools/processlauncher/CMakeLists.txt @@ -2,7 +2,7 @@ set(UTILSDIR "${PROJECT_SOURCE_DIR}/src/libs/utils") add_qtc_executable(qtcreator_processlauncher INCLUDES "${UTILSDIR}" - DEPENDS Qt5::Core Qt5::Network + DEPENDS Qt::Core Qt::Network DEFINES UTILS_STATIC_LIBRARY SOURCES launcherlogging.cpp diff --git a/src/tools/qml2puppet/CMakeLists.txt b/src/tools/qml2puppet/CMakeLists.txt index 9703bb2cdb9..e7c28a5c0d2 100644 --- a/src/tools/qml2puppet/CMakeLists.txt +++ b/src/tools/qml2puppet/CMakeLists.txt @@ -31,10 +31,10 @@ endif() add_qtc_executable(qml2puppet ${DESTINATION} - CONDITION TARGET Qt5::Quick + CONDITION TARGET Qt::Quick DEPENDS - Qt5::CorePrivate Qt5::Widgets Qt5::QmlPrivate - Qt5::QuickPrivate Qt5::Network Qt5::GuiPrivate + Qt::CorePrivate Qt::Widgets Qt::QmlPrivate + Qt::QuickPrivate Qt::Network Qt::GuiPrivate QmlPuppetCommunication INCLUDES ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} @@ -89,9 +89,9 @@ extend_qtc_executable(qml2puppet find_package(Qt5 5.15.0 COMPONENTS Quick3D QUIET) extend_qtc_executable(qml2puppet - CONDITION TARGET Qt5::Quick3D + CONDITION TARGET Qt::Quick3D FEATURE_INFO "Qt Quick 3D support" - DEPENDS Qt5::Quick3D Qt5::Quick3DPrivate + DEPENDS Qt::Quick3D Qt::Quick3DPrivate DEFINES QUICK3D_MODULE SOURCES_PREFIX qml2puppet/editor3d @@ -109,26 +109,26 @@ extend_qtc_executable(qml2puppet find_package(Qt5 5.15.0 COMPONENTS Quick3DAssetImport QUIET) extend_qtc_executable(qml2puppet - CONDITION TARGET Qt5::Quick3DAssetImport + CONDITION TARGET Qt::Quick3DAssetImport FEATURE_INFO "Qt Quick 3D asset import" - DEPENDS Qt5::Quick3DAssetImportPrivate + DEPENDS Qt::Quick3DAssetImportPrivate DEFINES IMPORT_QUICK3D_ASSETS ) find_package(Qt5 5.15.0 COMPONENTS Quick3DParticles QUIET) extend_qtc_executable(qml2puppet - CONDITION TARGET Qt5::Quick3DParticles + CONDITION TARGET Qt::Quick3DParticles FEATURE_INFO "Qt Quick 3D particles" - DEPENDS Qt5::Quick3DParticles Qt5::Quick3DParticlesPrivate + DEPENDS Qt::Quick3DParticles Qt::Quick3DParticlesPrivate DEFINES QUICK3D_PARTICLES_MODULE ) # Quick3DAssetUtils optionally depends on QuickTimeline, so find also it to make the CI build work find_package(Qt5 5.15.0 COMPONENTS Quick3DAssetUtils QuickTimeline QUIET) extend_qtc_executable(qml2puppet - CONDITION TARGET Qt5::Quick3DAssetUtils + CONDITION TARGET Qt::Quick3DAssetUtils FEATURE_INFO "Qt Quick 3D asset utils" - DEPENDS Qt5::Quick3DAssetUtilsPrivate + DEPENDS Qt::Quick3DAssetUtilsPrivate DEFINES QUICK3D_ASSET_UTILS_MODULE ) diff --git a/src/tools/qtc-askpass/CMakeLists.txt b/src/tools/qtc-askpass/CMakeLists.txt index 3d0bfb3c1b9..a28b259526b 100644 --- a/src/tools/qtc-askpass/CMakeLists.txt +++ b/src/tools/qtc-askpass/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_executable(qtc-askpass - DEPENDS Qt5::Widgets + DEPENDS Qt::Widgets SOURCES qtc-askpass-main.cpp ) diff --git a/src/tools/qtcdebugger/CMakeLists.txt b/src/tools/qtcdebugger/CMakeLists.txt index ff550d89106..659832a5e22 100644 --- a/src/tools/qtcdebugger/CMakeLists.txt +++ b/src/tools/qtcdebugger/CMakeLists.txt @@ -3,7 +3,7 @@ if (NOT WIN32) endif() add_qtc_executable(qtcdebugger - DEPENDS Qt5::Widgets registryaccess psapi app_version + DEPENDS Qt::Widgets registryaccess psapi app_version SOURCES main.cpp PROPERTIES WIN32_EXECUTABLE ON diff --git a/src/tools/qtcreatorcrashhandler/CMakeLists.txt b/src/tools/qtcreatorcrashhandler/CMakeLists.txt index a8d81ef892a..6ff5b8a0a61 100644 --- a/src/tools/qtcreatorcrashhandler/CMakeLists.txt +++ b/src/tools/qtcreatorcrashhandler/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_executable(qtcreator_crash_handler CONDITION UNIX AND NOT APPLE AND (CMAKE_BUILD_TYPE STREQUAL "Debug") - DEPENDS app_version Utils Qt5::Widgets + DEPENDS app_version Utils Qt::Widgets SOURCES backtracecollector.cpp backtracecollector.h crashhandler.cpp crashhandler.h diff --git a/src/tools/qtpromaker/CMakeLists.txt b/src/tools/qtpromaker/CMakeLists.txt index 5c81cdcd6bd..88fadc566e7 100644 --- a/src/tools/qtpromaker/CMakeLists.txt +++ b/src/tools/qtpromaker/CMakeLists.txt @@ -1 +1 @@ -add_qtc_executable(qtpromaker DEPENDS Qt5::Core SOURCES main.cpp) +add_qtc_executable(qtpromaker DEPENDS Qt::Core SOURCES main.cpp) diff --git a/src/tools/sdktool/CMakeLists.txt b/src/tools/sdktool/CMakeLists.txt index ffd578dbcac..3bf84b5886f 100644 --- a/src/tools/sdktool/CMakeLists.txt +++ b/src/tools/sdktool/CMakeLists.txt @@ -36,7 +36,7 @@ file(RELATIVE_PATH DATA_PATH "/${IDE_LIBEXEC_PATH}" "/${IDE_DATA_PATH}") add_qtc_library(sdktoolLib STATIC DEFINES DATA_PATH=\"${DATA_PATH}\" - PUBLIC_DEPENDS Qt5::Core + PUBLIC_DEPENDS Qt::Core PUBLIC_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} "${UtilsSourcesDir}/../" INCLUDES ${CMAKE_CURRENT_BINARY_DIR} diff --git a/src/tools/valgrindfake/CMakeLists.txt b/src/tools/valgrindfake/CMakeLists.txt index e62913674c3..6c4595ba559 100644 --- a/src/tools/valgrindfake/CMakeLists.txt +++ b/src/tools/valgrindfake/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_executable(valgrind-fake SKIP_INSTALL - DEPENDS Qt5::Network Qt5::Xml + DEPENDS Qt::Network Qt::Xml SOURCES main.cpp outputgenerator.cpp outputgenerator.h PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/tests/auto/aggregation/CMakeLists.txt b/tests/auto/aggregation/CMakeLists.txt index 1827d6b1114..85ebf353eb2 100644 --- a/tests/auto/aggregation/CMakeLists.txt +++ b/tests/auto/aggregation/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_aggregation - DEPENDS Aggregation Qt5::Core + DEPENDS Aggregation Qt::Core SOURCES tst_aggregate.cpp ) diff --git a/tests/auto/debugger/CMakeLists.txt b/tests/auto/debugger/CMakeLists.txt index a47babab8f3..5ed44a94d2f 100644 --- a/tests/auto/debugger/CMakeLists.txt +++ b/tests/auto/debugger/CMakeLists.txt @@ -20,7 +20,7 @@ if (NOT QT_CREATOR_API_DEFINED) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) - set(IMPLICIT_DEPENDS Qt5::Test) + set(IMPLICIT_DEPENDS Qt::Test) include(QtCreatorIDEBranding) include(QtCreatorAPI) @@ -46,12 +46,12 @@ add_qtc_test(tst_debugger_disassembler option(WITH_DEBUGGER_DUMPERS "Include tests for debugger pretty printers" ON) if (WITH_DEBUGGER_DUMPERS) - get_target_property(qmake_binary Qt5::qmake IMPORTED_LOCATION) + get_target_property(qmake_binary Qt::qmake IMPORTED_LOCATION) add_qtc_test(tst_debugger_dumpers EXCLUDE_FROM_PRECHECK TIMEOUT 0 - DEPENDS Qt5::Network Utils + DEPENDS Qt::Network Utils DEFINES DUMPERDIR="${PROJECT_SOURCE_DIR}/share/qtcreator/debugger" DEFAULT_QMAKE_BINARY="${qmake_binary}" @@ -68,7 +68,7 @@ if (WITH_DEBUGGER_DUMPERS) endif() add_qtc_test(tst_debugger_gdb - DEPENDS Qt5::Network Utils + DEPENDS Qt::Network Utils INCLUDES "${DEBUGGERDIR}" SOURCES tst_gdb.cpp @@ -77,7 +77,7 @@ add_qtc_test(tst_debugger_gdb ) add_qtc_test(tst_debugger_protocol - DEPENDS Qt5::Network Utils + DEPENDS Qt::Network Utils INCLUDES "${DEBUGGERDIR}" SOURCES @@ -87,7 +87,7 @@ add_qtc_test(tst_debugger_protocol ) add_qtc_test(tst_debugger_offsets - DEPENDS Qt5::CorePrivate + DEPENDS Qt::CorePrivate INCLUDES "${DEBUGGERDIR}" SOURCES tst_offsets.cpp ) diff --git a/tests/auto/qml/qmldesigner/coretests/CMakeLists.txt b/tests/auto/qml/qmldesigner/coretests/CMakeLists.txt index d7fce48ef7f..e1e73dd0ebb 100644 --- a/tests/auto/qml/qmldesigner/coretests/CMakeLists.txt +++ b/tests/auto/qml/qmldesigner/coretests/CMakeLists.txt @@ -4,8 +4,8 @@ add_qtc_test(tst_qml_testcore DEPENDS Sqlite QmlDesignerCore - Qt5::Widgets - Qt5::Qml + Qt::Widgets + Qt::Qml DEFINES QT_CREATOR IDE_PLUGIN_PATH="${PROJECT_BINARY_DIR}/${IDE_PLUGIN_PATH}" diff --git a/tests/auto/tracing/flamegraph/CMakeLists.txt b/tests/auto/tracing/flamegraph/CMakeLists.txt index eee7081aa2e..ae894557af4 100644 --- a/tests/auto/tracing/flamegraph/CMakeLists.txt +++ b/tests/auto/tracing/flamegraph/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_tracing_flamegraph - DEPENDS Tracing Qt5::Quick + DEPENDS Tracing Qt::Quick SOURCES tst_flamegraph.cpp ) diff --git a/tests/auto/tracing/flamegraphview/CMakeLists.txt b/tests/auto/tracing/flamegraphview/CMakeLists.txt index c873e54fa27..b1c53558a3a 100644 --- a/tests/auto/tracing/flamegraphview/CMakeLists.txt +++ b/tests/auto/tracing/flamegraphview/CMakeLists.txt @@ -5,7 +5,7 @@ set(TSTFLAMEGRAPHVIEW_CPP_SOURCES add_qtc_test(tst_tracing_flamegraphview EXCLUDE_FROM_PRECHECK - DEPENDS Tracing Qt5::QuickWidgets Qt5::Quick Utils + DEPENDS Tracing Qt::QuickWidgets Qt::Quick Utils ) if (NOT TARGET tst_tracing_flamegraphview) # qt_add_qml_module has no DEPENDS check diff --git a/tests/auto/tracing/timelineabstractrenderer/CMakeLists.txt b/tests/auto/tracing/timelineabstractrenderer/CMakeLists.txt index 5bf14c179c4..e9fdcffdb4a 100644 --- a/tests/auto/tracing/timelineabstractrenderer/CMakeLists.txt +++ b/tests/auto/tracing/timelineabstractrenderer/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_tracing_timelineabstractrenderer - DEPENDS Tracing Qt5::Gui Qt5::Quick + DEPENDS Tracing Qt::Gui Qt::Quick SOURCES tst_timelineabstractrenderer.cpp ) diff --git a/tests/auto/tracing/timelineitemsrenderpass/CMakeLists.txt b/tests/auto/tracing/timelineitemsrenderpass/CMakeLists.txt index 056880e54c8..5af1116952e 100644 --- a/tests/auto/tracing/timelineitemsrenderpass/CMakeLists.txt +++ b/tests/auto/tracing/timelineitemsrenderpass/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_tracing_timelineitemsrenderpass - DEPENDS Tracing Qt5::Quick + DEPENDS Tracing Qt::Quick SOURCES tst_timelineitemsrenderpass.cpp ) diff --git a/tests/auto/tracing/timelinemodel/CMakeLists.txt b/tests/auto/tracing/timelinemodel/CMakeLists.txt index 198f71e9b86..46133e0ffb9 100644 --- a/tests/auto/tracing/timelinemodel/CMakeLists.txt +++ b/tests/auto/tracing/timelinemodel/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_tracing_timelinemodel - DEPENDS Tracing Qt5::Gui + DEPENDS Tracing Qt::Gui SOURCES tst_timelinemodel.cpp ) diff --git a/tests/auto/tracing/timelinemodelaggregator/CMakeLists.txt b/tests/auto/tracing/timelinemodelaggregator/CMakeLists.txt index 7845c6ad51b..2511965989e 100644 --- a/tests/auto/tracing/timelinemodelaggregator/CMakeLists.txt +++ b/tests/auto/tracing/timelinemodelaggregator/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_tracing_timelinemodelaggregator - DEPENDS Tracing Qt5::Gui + DEPENDS Tracing Qt::Gui SOURCES tst_timelinemodelaggregator.cpp ) diff --git a/tests/auto/tracing/timelinenotesmodel/CMakeLists.txt b/tests/auto/tracing/timelinenotesmodel/CMakeLists.txt index d59241ad984..7b945f92dc1 100644 --- a/tests/auto/tracing/timelinenotesmodel/CMakeLists.txt +++ b/tests/auto/tracing/timelinenotesmodel/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_tracing_timelinenotesmodel - DEPENDS Tracing Qt5::Gui + DEPENDS Tracing Qt::Gui SOURCES tst_timelinenotesmodel.cpp ) diff --git a/tests/auto/tracing/timelinenotesrenderpass/CMakeLists.txt b/tests/auto/tracing/timelinenotesrenderpass/CMakeLists.txt index 4bed7af0d5b..f0d6f0397ad 100644 --- a/tests/auto/tracing/timelinenotesrenderpass/CMakeLists.txt +++ b/tests/auto/tracing/timelinenotesrenderpass/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_tracing_timelinenotesrenderpass - DEPENDS Tracing Qt5::Quick + DEPENDS Tracing Qt::Quick SOURCES tst_timelinenotesrenderpass.cpp ) diff --git a/tests/auto/tracing/timelineoverviewrenderer/CMakeLists.txt b/tests/auto/tracing/timelineoverviewrenderer/CMakeLists.txt index 275765765d7..7d165d0a39b 100644 --- a/tests/auto/tracing/timelineoverviewrenderer/CMakeLists.txt +++ b/tests/auto/tracing/timelineoverviewrenderer/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_tracing_timelineoverviewrenderer - DEPENDS Tracing Qt5::Quick + DEPENDS Tracing Qt::Quick SOURCES tst_timelineoverviewrenderer.cpp ) diff --git a/tests/auto/tracing/timelinerenderer/CMakeLists.txt b/tests/auto/tracing/timelinerenderer/CMakeLists.txt index db71a10c4a1..ca8239fe680 100644 --- a/tests/auto/tracing/timelinerenderer/CMakeLists.txt +++ b/tests/auto/tracing/timelinerenderer/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_test(tst_tracing_timelinerenderer EXCLUDE_FROM_PRECHECK - DEPENDS Tracing Qt5::Gui Qt5::Quick + DEPENDS Tracing Qt::Gui Qt::Quick SOURCES tst_timelinerenderer.cpp ) diff --git a/tests/auto/tracing/timelinerenderstate/CMakeLists.txt b/tests/auto/tracing/timelinerenderstate/CMakeLists.txt index 53f0b674154..e1c9fae2de0 100644 --- a/tests/auto/tracing/timelinerenderstate/CMakeLists.txt +++ b/tests/auto/tracing/timelinerenderstate/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_tracing_timelinerenderstate - DEPENDS Tracing Qt5::Gui Qt5::Quick + DEPENDS Tracing Qt::Gui Qt::Quick SOURCES tst_timelinerenderstate.cpp ) diff --git a/tests/auto/tracing/timelineselectionrenderpass/CMakeLists.txt b/tests/auto/tracing/timelineselectionrenderpass/CMakeLists.txt index a3e3c9af676..acb8f54220c 100644 --- a/tests/auto/tracing/timelineselectionrenderpass/CMakeLists.txt +++ b/tests/auto/tracing/timelineselectionrenderpass/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_tracing_timelineselectionrenderpass - DEPENDS Tracing Qt5::Quick + DEPENDS Tracing Qt::Quick SOURCES tst_timelineselectionrenderpass.cpp ) diff --git a/tests/auto/tracing/timelinezoomcontrol/CMakeLists.txt b/tests/auto/tracing/timelinezoomcontrol/CMakeLists.txt index 1e5f7989e9e..ced52ce2a76 100644 --- a/tests/auto/tracing/timelinezoomcontrol/CMakeLists.txt +++ b/tests/auto/tracing/timelinezoomcontrol/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_tracing_timelinezoomcontrol - DEPENDS Tracing Qt5::Gui + DEPENDS Tracing Qt::Gui SOURCES tst_timelinezoomcontrol.cpp ) diff --git a/tests/auto/updateinfo/CMakeLists.txt b/tests/auto/updateinfo/CMakeLists.txt index e44adb8ff81..ee85fa40b5e 100644 --- a/tests/auto/updateinfo/CMakeLists.txt +++ b/tests/auto/updateinfo/CMakeLists.txt @@ -1,5 +1,5 @@ add_qtc_test(tst_updateinfo INCLUDES ${PROJECT_SOURCE_DIR}/src/plugins - DEPENDS Utils Qt5::Xml + DEPENDS Utils Qt::Xml SOURCES tst_updateinfo.cpp ) diff --git a/tests/auto/valgrind/callgrind/CMakeLists.txt b/tests/auto/valgrind/callgrind/CMakeLists.txt index 74ed6ef157a..4b17e2cdd76 100644 --- a/tests/auto/valgrind/callgrind/CMakeLists.txt +++ b/tests/auto/valgrind/callgrind/CMakeLists.txt @@ -1,7 +1,7 @@ include(../valgrind.cmake) add_qtc_test(tst_callgrindparsertests - DEPENDS Utils Core ProjectExplorer Debugger Qt5::Core Qt5::Network + DEPENDS Utils Core ProjectExplorer Debugger Qt::Core Qt::Network DEFINES PARSERTESTS_DATA_DIR="${CMAKE_CURRENT_LIST_DIR}/data" CALLGRINDPARSERTESTS diff --git a/tests/auto/valgrind/memcheck/testapps/leak1/CMakeLists.txt b/tests/auto/valgrind/memcheck/testapps/leak1/CMakeLists.txt index cd05f350fda..756361f84bf 100644 --- a/tests/auto/valgrind/memcheck/testapps/leak1/CMakeLists.txt +++ b/tests/auto/valgrind/memcheck/testapps/leak1/CMakeLists.txt @@ -1,5 +1,5 @@ include(../testapp.cmake) add_valgrind_testapp(leak1) -target_link_libraries(leak1 PRIVATE Qt5::Core) +target_link_libraries(leak1 PRIVATE Qt::Core) diff --git a/tests/auto/valgrind/memcheck/testapps/leak4/CMakeLists.txt b/tests/auto/valgrind/memcheck/testapps/leak4/CMakeLists.txt index 112d8b2e9df..c5524d74a67 100644 --- a/tests/auto/valgrind/memcheck/testapps/leak4/CMakeLists.txt +++ b/tests/auto/valgrind/memcheck/testapps/leak4/CMakeLists.txt @@ -1,4 +1,4 @@ include(../testapp.cmake) add_valgrind_testapp(leak4) -target_link_libraries(leak4 PRIVATE Qt5::Core) +target_link_libraries(leak4 PRIVATE Qt::Core) diff --git a/tests/manual/proparser/CMakeLists.txt b/tests/manual/proparser/CMakeLists.txt index d376a7bb8c1..915957505cc 100644 --- a/tests/manual/proparser/CMakeLists.txt +++ b/tests/manual/proparser/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_test(tst_manual_proparser MANUALTEST - DEPENDS Qt5::Core Qt5::Core5Compat + DEPENDS Qt::Core Qt::Core5Compat DEFINES "QMAKE_BUILTIN_PRFS" "QT_NO_CAST_TO_ASCII" diff --git a/tests/manual/widgets/crumblepath/CMakeLists.txt b/tests/manual/widgets/crumblepath/CMakeLists.txt index 0729605e98d..7c813ef95b8 100644 --- a/tests/manual/widgets/crumblepath/CMakeLists.txt +++ b/tests/manual/widgets/crumblepath/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_test(tst_manual_widgets_crumblepath MANUALTEST - DEPENDS Qt5::Gui Utils Core + DEPENDS Qt::Gui Utils Core SOURCES tst_manual_widgets_crumblepath.cpp ../common/themeselector.cpp ../common/themeselector.h diff --git a/tests/manual/widgets/infolabel/CMakeLists.txt b/tests/manual/widgets/infolabel/CMakeLists.txt index 62d30424d0c..a0d9ef758d9 100644 --- a/tests/manual/widgets/infolabel/CMakeLists.txt +++ b/tests/manual/widgets/infolabel/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_test(tst_manual_widgets_infolabel MANUALTEST - DEPENDS Qt5::Gui Utils Core + DEPENDS Qt::Gui Utils Core SOURCES tst_manual_widgets_infolabel.cpp ../common/themeselector.cpp ../common/themeselector.h diff --git a/tests/manual/widgets/layoutbuilder/CMakeLists.txt b/tests/manual/widgets/layoutbuilder/CMakeLists.txt index d80ab33524d..5fa156f986e 100644 --- a/tests/manual/widgets/layoutbuilder/CMakeLists.txt +++ b/tests/manual/widgets/layoutbuilder/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_test(tst_manual_widgets_layoutbuilder MANUALTEST - DEPENDS Qt5::Gui Utils Core + DEPENDS Qt::Gui Utils Core SOURCES tst_manual_widgets_layoutbuilder.cpp ) diff --git a/tests/manual/widgets/manhattanstyle/CMakeLists.txt b/tests/manual/widgets/manhattanstyle/CMakeLists.txt index 16273bd0b57..42a489cfaee 100644 --- a/tests/manual/widgets/manhattanstyle/CMakeLists.txt +++ b/tests/manual/widgets/manhattanstyle/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_test(tst_manual_widgets_manhattanstyle MANUALTEST - DEPENDS Qt5::Gui Utils Core + DEPENDS Qt::Gui Utils Core SOURCES tst_manual_widgets_manhattanstyle.cpp ../common/themeselector.cpp ../common/themeselector.h diff --git a/tests/manual/widgets/tracing/CMakeLists.txt b/tests/manual/widgets/tracing/CMakeLists.txt index 1dbd69984c5..0d34eabd886 100644 --- a/tests/manual/widgets/tracing/CMakeLists.txt +++ b/tests/manual/widgets/tracing/CMakeLists.txt @@ -1,7 +1,7 @@ add_qtc_test(tst_manual_widgets_tracing MANUALTEST CONDITION TARGET Tracing - DEPENDS Tracing Utils Core Qt5::Gui Qt5::Quick + DEPENDS Tracing Utils Core Qt::Gui Qt::Quick SOURCES tst_manual_widgets_tracing.cpp ../common/themeselector.cpp ../common/themeselector.h diff --git a/tests/tools/qml-ast2dot/CMakeLists.txt b/tests/tools/qml-ast2dot/CMakeLists.txt index 5e4a852243d..ba4acfb9dc4 100644 --- a/tests/tools/qml-ast2dot/CMakeLists.txt +++ b/tests/tools/qml-ast2dot/CMakeLists.txt @@ -1,6 +1,6 @@ add_qtc_executable(qml_ast2dot BUILD_DEFAULT OFF - DEPENDS Qt5::Core Qt5::Gui QmlJS + DEPENDS Qt::Core Qt::Gui QmlJS SOURCES main.cpp ) diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 8eb2367774f..3a36658ae4f 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -21,7 +21,7 @@ if (NOT QT_CREATOR_API_DEFINED) set(CMAKE_INCLUDE_CURRENT_DIR ON) - set(IMPLICIT_DEPENDS Qt5::Test) + set(IMPLICIT_DEPENDS Qt::Test) include(QtCreatorIDEBranding) include(QtCreatorAPI) diff --git a/tests/unit/unittest/CMakeLists.txt b/tests/unit/unittest/CMakeLists.txt index 4e2deb605d0..f92016fc32e 100644 --- a/tests/unit/unittest/CMakeLists.txt +++ b/tests/unit/unittest/CMakeLists.txt @@ -22,8 +22,8 @@ add_qtc_test(unittest GTEST BEFORE "../mockup" BEFORE "../mockup/qmldesigner/designercore/include" DEPENDS - Qt5::Core Qt5::Network Qt5::Widgets - Qt5::Xml Qt5::Concurrent Qt5::Qml Qt5::Gui + Qt::Core Qt::Network Qt::Widgets + Qt::Xml Qt::Concurrent Qt::Qml Qt::Gui Qt6Core5Compat QmlJS Sqlite SqliteC Googletest CONDITION Qt5_VERSION VERSION_GREATER_EQUAL 6.2.0