cmake build: Fix PLUGIN_RECOMMENDS

Use the right variable name, and syntax for iterating the list.
Fix plugin configuration order, so targets are found.
Fix misspelled plugin name.

Also remove unused and wrong "EXPERIMENTAL" option.

Change-Id: I77cc5d12ebdaa8bcd0315dd830a9435c648b2ba3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Eike Ziller
2020-12-11 10:13:23 +01:00
parent 58ce987314
commit 0a20b8e7de
3 changed files with 13 additions and 13 deletions

View File

@@ -275,7 +275,7 @@ endfunction(add_qtc_library)
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;SKIP_INSTALL;INTERNAL_ONLY;SKIP_TRANSLATION;EXPORT" "SKIP_DEBUG_CMAKE_FILE_CHECK;SKIP_INSTALL;INTERNAL_ONLY;SKIP_TRANSLATION;EXPORT"
"VERSION;COMPAT_VERSION;PLUGIN_JSON_IN;PLUGIN_PATH;PLUGIN_NAME;OUTPUT_NAME;BUILD_DEFAULT" "VERSION;COMPAT_VERSION;PLUGIN_JSON_IN;PLUGIN_PATH;PLUGIN_NAME;OUTPUT_NAME;BUILD_DEFAULT"
"CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PLUGIN_DEPENDS;PLUGIN_RECOMMENDS;PROPERTIES" "CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;PUBLIC_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PLUGIN_DEPENDS;PLUGIN_RECOMMENDS;PROPERTIES"
${ARGN} ${ARGN}
@@ -352,10 +352,7 @@ function(add_qtc_plugin target_name)
" { \"Name\" : \"${i}\", \"Version\" : \"${_v}\" }" " { \"Name\" : \"${i}\", \"Version\" : \"${_v}\" }"
) )
endforeach(i) endforeach(i)
string(REPLACE "} {" "},\n {" foreach(i IN LISTS _arg_PLUGIN_RECOMMENDS)
_arg_DEPENDENCY_STRING "${_arg_DEPENDENCY_STRING}"
)
foreach(i IN LISTS ${_arg_RECOMMENDS})
if (i MATCHES "^QtCreator::") if (i MATCHES "^QtCreator::")
set(_v ${IDE_VERSION}) set(_v ${IDE_VERSION})
string(REPLACE "QtCreator::" "" i ${i}) string(REPLACE "QtCreator::" "" i ${i})
@@ -366,10 +363,11 @@ function(add_qtc_plugin target_name)
" { \"Name\" : \"${i}\", \"Version\" : \"${_v}\", \"Type\" : \"optional\" }" " { \"Name\" : \"${i}\", \"Version\" : \"${_v}\", \"Type\" : \"optional\" }"
) )
endforeach(i) endforeach(i)
string(REPLACE "} {" "},\n {"
_arg_DEPENDENCY_STRING "${_arg_DEPENDENCY_STRING}"
)
string(APPEND _arg_DEPENDENCY_STRING "\n ]") string(APPEND _arg_DEPENDENCY_STRING "\n ]")
if (_arg_EXPERIMENTAL)
string(APPEND _arg_DEPENDENCY_STRING ",\n \"Experimental\" : true")
endif()
set(IDE_PLUGIN_DEPENDENCY_STRING ${_arg_DEPENDENCY_STRING}) set(IDE_PLUGIN_DEPENDENCY_STRING ${_arg_DEPENDENCY_STRING})

View File

@@ -26,7 +26,6 @@ add_subdirectory(help)
add_subdirectory(resourceeditor) add_subdirectory(resourceeditor)
add_subdirectory(tasklist) add_subdirectory(tasklist)
add_subdirectory(nim) add_subdirectory(nim)
add_subdirectory(incredibuild)
add_subdirectory(conan) add_subdirectory(conan)
# Level 4: (only depends on Level 3 and below) # Level 4: (only depends on Level 3 and below)
@@ -45,9 +44,7 @@ add_subdirectory(beautifier)
add_subdirectory(clangformat) add_subdirectory(clangformat)
add_subdirectory(clangrefactoring) add_subdirectory(clangrefactoring)
add_subdirectory(clearcase) add_subdirectory(clearcase)
add_subdirectory(cmakeprojectmanager)
add_subdirectory(cvs) add_subdirectory(cvs)
add_subdirectory(debugger)
add_subdirectory(designer) add_subdirectory(designer)
add_subdirectory(fakevim) add_subdirectory(fakevim)
add_subdirectory(genericprojectmanager) add_subdirectory(genericprojectmanager)
@@ -65,6 +62,10 @@ add_subdirectory(languageclient)
add_subdirectory(studiowelcome) add_subdirectory(studiowelcome)
# Level 6: # Level 6:
add_subdirectory(cmakeprojectmanager)
add_subdirectory(debugger)
# Level 7:
add_subdirectory(android) add_subdirectory(android)
add_subdirectory(autotest) add_subdirectory(autotest)
add_subdirectory(autotoolsprojectmanager) add_subdirectory(autotoolsprojectmanager)
@@ -72,6 +73,7 @@ add_subdirectory(baremetal)
add_subdirectory(clangcodemodel) add_subdirectory(clangcodemodel)
add_subdirectory(clangtools) add_subdirectory(clangtools)
add_subdirectory(cppcheck) add_subdirectory(cppcheck)
add_subdirectory(incredibuild)
add_subdirectory(ios) add_subdirectory(ios)
add_subdirectory(python) add_subdirectory(python)
add_subdirectory(qmljseditor) add_subdirectory(qmljseditor)
@@ -84,7 +86,7 @@ add_subdirectory(perfprofiler)
add_subdirectory(qbsprojectmanager) add_subdirectory(qbsprojectmanager)
add_subdirectory(ctfvisualizer) add_subdirectory(ctfvisualizer)
# Level 7: # Level 8:
add_subdirectory(boot2qt) add_subdirectory(boot2qt)
unset(qmldesigner_builddir) unset(qmldesigner_builddir)
if (WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") if (WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")

View File

@@ -1,6 +1,6 @@
add_qtc_plugin(IncrediBuild add_qtc_plugin(IncrediBuild
PLUGIN_DEPENDS Core ProjectExplorer PLUGIN_DEPENDS Core ProjectExplorer
PLUGIN_RECOMMENDS QmakeProjectManager CmakeProjectManager PLUGIN_RECOMMENDS QmakeProjectManager CMakeProjectManager
SOURCES SOURCES
buildconsolebuildstep.cpp buildconsolebuildstep.cpp
buildconsolebuildstep.h buildconsolebuildstep.h