qmake: How do I copy .dll/.so's to the output directory?

qmake, qt

Solution

Add this to your pro file:

target.path = ../testProject/$$TARGET
INSTALLS += target 

Problem

I have a Qt-project that builds a dll/shared-library and another Qt-project that tests the library. Is there any good way to have qmake copy the dll to the output-folder of the test-project?

Original source