I'm trying to change the build output directory in QT Creator (i.e. instead of outputting to ./debug, I want to output to ../../bin/debug). I've tried to edit the build output directory via the Projects mode, but it's read only. Looking at the .pro file doesn't seem to have anything obvious for me to edit.
-
1I don't use qmake but perhaps this will be helpful: stackoverflow.com/questions/1741877/qt-and-qmake-build-dirHostileFork says dont trust SE– HostileFork says dont trust SE2010-05-31 14:18:42 +00:00Commented May 31, 2010 at 14:18
-
I've been able to do this by setting DESTDIR, but I can't find the per-config way of doing it (i.e. I want a different dir for each of debug and release).Nick Bolton– Nick Bolton2010-05-31 14:45:09 +00:00Commented May 31, 2010 at 14:45
-
possible duplicate of How to specify different Debug/Release output directories in QMake .pro fileNick Bolton– Nick Bolton2010-05-31 15:08:59 +00:00Commented May 31, 2010 at 15:08
-
1Duplicate of: stackoverflow.com/questions/2580934/…Nick Bolton– Nick Bolton2010-05-31 15:09:09 +00:00Commented May 31, 2010 at 15:09
2 Answers
I was having a permissions problem and Qt was unable to run the compiled program in my windows partition so I had to change the build path to run in Linux, to do this I edited the {projectName}.pro.user located in the project folder and changed the following variable(s) which may vary depending on you project settings):
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/new/path</value>
this value will belong to one specific target (release or debug) just see where tag belongs to.
1 Comment
You can also do it directly from inside QtCreator. Go to Projects | Build & Run | Build | General | Build Directory. When you enter a new directory path, the text will turn red - indicating that the directory the as yet unmade output build will be in does not exist yet. When you build the project, however, it will turn black.