diff options
| -rw-r--r-- | cmake/QtPluginHelpers.cmake | 39 | ||||
| -rw-r--r-- | cmake/QtPriHelpers.cmake | 2 | ||||
| -rw-r--r-- | qmake/generators/mac/pbuilder_pbx.cpp | 9 |
3 files changed, 31 insertions, 19 deletions
diff --git a/cmake/QtPluginHelpers.cmake b/cmake/QtPluginHelpers.cmake index d210d29cdcf..a3a4c94a806 100644 --- a/cmake/QtPluginHelpers.cmake +++ b/cmake/QtPluginHelpers.cmake @@ -140,6 +140,23 @@ function(qt_internal_add_plugin target) unset(plugin_install_package_suffix) + # The generic plugins should be enabled by default. + # But platform plugins should always be disabled by default, and only one is enabled + # based on the platform (condition specified in arg_DEFAULT_IF). + if(plugin_type_escaped STREQUAL "platforms") + set(_default_plugin 0) + else() + set(_default_plugin 1) + endif() + + if(DEFINED arg_DEFAULT_IF) + if(${arg_DEFAULT_IF}) + set(_default_plugin 1) + else() + set(_default_plugin 0) + endif() + endif() + # Save the Qt module in the plug-in's properties and vice versa if(NOT plugin_type_escaped STREQUAL "qml_plugin") qt_internal_get_module_for_plugin("${target}" "${plugin_type_escaped}" qt_module) @@ -166,7 +183,10 @@ function(qt_internal_add_plugin target) DIRECTORY ${module_source_dir} DEFINITION PROJECT_NAME ) - if(module_project_name STREQUAL PROJECT_NAME) + + # When linking static plugins with the special logic in qt_internal_add_executable, + # make sure to skip non-default plugins. + if(module_project_name STREQUAL PROJECT_NAME AND _default_plugin) set_property(TARGET ${qt_module_target} APPEND PROPERTY _qt_repo_plugins "${target}") set_property(TARGET ${qt_module_target} APPEND PROPERTY _qt_repo_plugin_class_names "$<TARGET_PROPERTY:${target},QT_PLUGIN_CLASS_NAME>" @@ -195,23 +215,6 @@ function(qt_internal_add_plugin target) _qt_plugin_install_package_suffix "${plugin_install_package_suffix}") endif() - # The generic plugins should be enabled by default. - # But platform plugins should always be disabled by default, and only one is enabled - # based on the platform (condition specified in arg_DEFAULT_IF). - if(plugin_type_escaped STREQUAL "platforms") - set(_default_plugin 0) - else() - set(_default_plugin 1) - endif() - - if (DEFINED arg_DEFAULT_IF) - if (NOT ${arg_DEFAULT_IF}) - set(_default_plugin 0) - else() - set(_default_plugin 1) - endif() - endif() - if(TARGET qt_plugins) add_dependencies(qt_plugins "${target}") endif() diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake index e425a4ec2b9..36f455bfa11 100644 --- a/cmake/QtPriHelpers.cmake +++ b/cmake/QtPriHelpers.cmake @@ -454,7 +454,7 @@ function(qt_generate_plugin_pri_file target pri_file_var) get_target_property(plugin_class_name ${target} QT_PLUGIN_CLASS_NAME) set(plugin_extends "") - if(NOT default_plugin AND (plugin_type STREQUAL "generic" OR plugin_type STREQUAL "platforms")) + if(NOT default_plugin) set(plugin_extends "-") endif() diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 05534677a34..c1c9336c92b 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -784,6 +784,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) QString mkfile = pbx_dir + Option::dir_sep + "qt_preprocess.mak"; QFile mkf(mkfile); ProStringList outputPaths; + ProStringList inputPaths; if(mkf.open(QIODevice::WriteOnly | QIODevice::Text)) { writingUnixMakefileGenerator = true; debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData()); @@ -836,6 +837,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) QString path = escapeDependencyPath(Option::fixPathToTargetOS( replaceExtraCompilerVariables(tmpOut, file_name, QString(), NoShell))); mkt << ' ' << path; + inputPaths << fn; outputPaths << path; } } @@ -849,6 +851,12 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } // Remove duplicates from build steps with "combine" outputPaths.removeDuplicates(); + + // Don't create cycles. We only have one qt_preprocess.mak which runs different compilers + // whose inputs may depend on the output of another. The "compilers" step will run all + // compilers anyway + inputPaths.removeEach(outputPaths); + mkfile = fileFixify(mkfile); QString phase_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET"); // project->values("QMAKE_PBX_BUILDPHASES").append(phase_key); @@ -859,6 +867,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n" << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n" << "\t\t\t" << writeSettings("name", "Qt Preprocessors") << ";\n" + << "\t\t\t" << writeSettings("inputPaths", inputPaths, SettingsAsList, 4) << ";\n" << "\t\t\t" << writeSettings("outputPaths", outputPaths, SettingsAsList, 4) << ";\n" << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";\n" << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(Option::output_dir) |
