Reputation: 157
I try to copy the Target file, from creation directory to an own sub directory of my project. It looks like
Project/my.pro
Project/libs/mylib.so
Project/libs/mylibtool.so
Project/output
Now I added to my project file :
DISTDIR = $$PWD/output
MediaFiles.files += libs/mylib.so
MediaFiles.files += libs/mylibtool.so
MediaFiles.path = $$PWD/output //Also tried $$DISTDIR
//MediaFiles.path = $$TARGET //tried for build app
INSTALLS += MediaFiles
But nothing will reach my output directory. What I do wrong?
I use QTCreator on Ubuntu.
Upvotes: 1
Views: 117
Reputation: 32655
To copy the files you can use QMAKE_POST_LINK
variable which contains the command to execute after linking the TARGET together. So it is like:
QMAKE_POST_LINK += $$quote(cp $$PWD/libs/mylib.so $$PWD/output)
QMAKE_POST_LINK += $$quote(cp $$PWD/libs/mylibtool.so $$PWD/output)
These will copy the files to output
.
Upvotes: 1
Reputation: 887
Setting up the project file tells Creator where you would like installations to go...when you actually install. Did you add a "make install" command to your build steps?
Upvotes: 0