Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify build directory in Qt Creator for shadow build without use of an absolute path?

Absolute paths are ridiculous. All we need - and all we are allowed, by the way - is to use a folder on the same level that the folder containing .pro file for shadow builds. There are bugs otherwise.

But you can't just specify ../mingw_debug for example. Yes, it is a relative path but relative to what? It turns out it is relative to current directory of Qt Creator, and this is completely meaningless.

%{sourceDir} is of no help either. %{sourceDir}/../mingw_debug dosen't work, at least on Windows. If there was a way to extract parent folder from sourceDir!

Does anybody know a way to solve the issue?

like image 651
Sergey Skoblikov Avatar asked Aug 10 '12 17:08

Sergey Skoblikov


People also ask

What is shadow build in Qt?

Shadow building means building a project in a separate directory, the build directory. The build directory is different from the source directory. One of the benefits of shadow building is that it keeps your source directory clean, which makes it faster to switch between build configurations.

How do I disable Shadow build in Qt?

In the build settings pane (the larger portion of the screen) there's a checkbox next to "Shadow build" (there's separate option depending on the debug/release configuration).


1 Answers

In Qt Creator 3.6.1 at least, this is fixed - relative paths work just fine. The resolved full path is shown in the tooltip. I don't know when in the past few years this was fixed.

like image 147
James Turner Avatar answered Oct 06 '22 01:10

James Turner