Shared Library: Copying after build (Install)
Solved
General and Desktop
-
I have a shared library Qt project and I would like to copy the output *.dll or *.so file to another custom destination after build.
I'm using Windows now, but this solution must be cross-platform (Windows, Linux and Mac).I tried something like:
shared_lib.path = "C:/Users/lamar/Desktop/shared_lib_folder" # valid only in Windows enviroment shared_lib.files += $$OUT_PWD/debug/my_shared_lib.dll # or *.so or *.dylib INSTALLS += shared_lib
Thanks,
-
I know you already solved this but I ran across a library today that utilized QMAKE_POST_LINK that may work better for you.
Here is one site from google.
QMake - how to copy a file to the output
Maybe more what you're looking for...
Take Care
-
Another way is to add
make install
as a custom build step in Qt Creator: https://doc.qt.io/qtcreator/creator-build-settings.html