How to specify various working directories in qt creator?

I use the latest QT SDK under Windows and wonder how I determine the working directory based on the type of assembly. I need a different working directory, and also release and debug builds of the same project. For example, I have a launch target called MyProgram and two build targets, Release and Debug. MyProgram depends on some external libraries. When I run MyProgram in debugging, I need it to run in the C: \ foo \ bar \ libraries \ debug directory, however, when I run it in the version, I need to run it in the C: \ foo \ bar \ libraries \ directory release. It seems that the working directory depends only on the launch target, and not on the build target. Is there a way to specify the working directory based on both the launch and the build target? Can I use a variable to indicate release / debugging in the working directory?

+4
source share
1 answer

Yes, you can. Delete the .pro.user file in the project directory, open the project and select "Create assembly configuration" manually and check the "Use shadow construction" box. Now you can specify the target directories. BTW, for a better solution for your missing libraries, check out the Qt resource system: http://developer.qt.nokia.com/doc/qt-4.8/QResource.html

+1
source

Source: https://habr.com/ru/post/1389329/


All Articles