Does Qt Creator set a qmake variable containing the build directory that can be referenced from the Qt project file?
The Qt Creator Default build directory:
../build-%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}
My goal is to copy the dll's import lib from the build output using QMAKE_POST_LINK to make it easier for my client project to link with. QMAKE_POST_LINK works if I hard code the path of the import lib.
For example:
QMAKE_POST_LINK = copy C:\projects\ICP\sw\icpts\sandbox\configurable-system-test-io\build-lib-configurable-system-test-io-Desktop_Qt_5_1_0_MSVC2012_32bit_eb09a8-Debug\debug\*.lib ..\my-lib
Solution: Solution provided by fbucek to use $$OUT_DIR solved my problem. Thank You!
Example of Multiple QMAKE_POST_LINK commands:
QMAKE_POST_LINK += $$quote(copy /Y $$shell_path($$OUT_PWD)\debug\*.dll ..\lib$$escape_expand(\\n)) QMAKE_POST_LINK += $$quote(copy /Y $$shell_path($$OUT_PWD)\debug\*.lib ..\lib$$escape_expand(\\n)) QMAKE_POST_LINK += $$quote(copy /Y $$shell_path($$OUT_PWD)\debug\*.pdb ..\lib$$escape_expand(\\n))
Thanks again for $$OUT_PWD !
-Ed
Yes it does
Put this in pro file, run qmake and check if it shows what you want
message($$OUT_PWD)
Qmake Variable Reference OUT_PWD
Then you can use it like this: ( I hope - not tested )
QMAKE_POST_LINK = copy $$OUT_PWD\debug\*.lib ..\my-lib