forked from qt-creator/qt-creator
CMake: Improve handling of CMAKE_RUNTIME_OUTPUT_DIRECTORY
Set the working directory of binaries which got moved from the build directory using CMAKE_RUNTIME_OUTPUT_DIRECTORY to the directory the binay is actualy in. Task-number: QTCREATORBUG-18158 Change-Id: I059d55a6c408799f3220bd90c271a6d743e6cd82 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -204,7 +204,11 @@ QList<CMakeBuildTarget> ServerModeReader::buildTargets() const
|
||||
else
|
||||
type = UtilityType;
|
||||
ct.targetType = type;
|
||||
if (t->artifacts.isEmpty()) {
|
||||
ct.workingDirectory = t->buildDirectory;
|
||||
} else {
|
||||
ct.workingDirectory = Utils::FileName::fromString(t->artifacts.at(0).toFileInfo().absolutePath());
|
||||
}
|
||||
ct.sourceDirectory = t->sourceDirectory;
|
||||
return ct;
|
||||
});
|
||||
|
Reference in New Issue
Block a user