forked from qt-creator/qt-creator
CMakePM: Copy auto package-manager to ${buildDir}/.qtc/ directory
By copying the ${IDE:ResourcePath}/package-manager to
${buildDir}/.qtc/ the problem with hardcoding paths
to old an Qt Creator version can no longer occur.
This also fixes the issue with remote projects by reffering
to the code residing on the host.
With the above issues fixed, enable "Package manager auto setup"
by default.
Change-Id: Ia49654a3b9059f83886e64d065019b2d55e9299c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -1126,13 +1126,11 @@ static CommandLine defaultInitialCMakeCommand(const Kit *k, const QString buildT
|
||||
if (!buildType.isEmpty() && !CMakeGeneratorKitAspect::isMultiConfigGenerator(k))
|
||||
cmd.addArg("-DCMAKE_BUILD_TYPE:STRING=" + buildType);
|
||||
|
||||
auto settings = Internal::CMakeSpecificSettings::instance();
|
||||
|
||||
// Package manager auto setup. The file auto-setup.cmake resides on the host,
|
||||
// so it's not accessible for remotely running cmakes. We need to exclude that case.
|
||||
if (!cmd.executable().needsDevice() && settings->packageManagerAutoSetup.value()) {
|
||||
cmd.addArg("-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH="
|
||||
"%{IDE:ResourcePath}/package-manager/auto-setup.cmake");
|
||||
// Package manager auto setup
|
||||
if (Internal::CMakeSpecificSettings::instance()->packageManagerAutoSetup.value()) {
|
||||
cmd.addArg(QString("-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH="
|
||||
"%{buildDir}/%1/auto-setup.cmake")
|
||||
.arg(Constants::PACKAGE_MANAGER_DIR));
|
||||
}
|
||||
|
||||
// Cross-compilation settings:
|
||||
|
||||
Reference in New Issue
Block a user