I'm using the latest QT SDK under Windows and am wondering how I specify a working directory based on the build type. I need a different working directory and release and debug builds of the same project. For instance, I have a run target called MyProgram and two build targets, Release and Debug. MyProgram depends on some external libraries. When I run MyProgram in debug I need it to run in the directory C:\foo\bar\libraries\debug, however when I run it in release I need it to run in directory C:\foo\bar\libraries\release. It would appear that the Working Directory is only dependent on the run target and not on the build target. Is there a way to specify a Working Directory based on both run and build target? Could I use a variable to specify release/debug in the Working Directory?
Yes, you can. Delete the .pro.user file in the project directory, open the project, and set "Create build configurations" to manually, and check "Use shadow building". Now you can specify the target directories. BTW, for a better solution for your missing libs, check out the Qt resource system: http://developer.qt.nokia.com/doc/qt-4.8/QResource.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With