There was such a problem: using cmake to install the compiled executable in a certain directory, along with all the dependent libraries (qt), so that later this folder could be simply transferred to another computer, with the same architecture (and installed packages, like built-essential). And do it on two systems: linux & windows. And then there are two problems:
1) What are the dependencies of Qt libraries and how to detect them with cmake (if possible)
2) when used
install(FILES $<TARGET_FILE:Qt5::packet> DESTINATION bin) on Linux, the following libraries will be copied: libQt5packet.so.5.11.1 and when you try to start, the program will immediately declare that it cannot find the corresponding libraries. And the team
export LD_LIBRARY_PATH=/install path/bin No result gives.
UPD The second problem was solved: the problem was that the program tries to link to an alias (pointer to the library), which has the form libQt5some_package.so.5 , so it must also be copied, for which there is a corresponding generator expression in cmake :
install(FILES $<TARGET_SONAME_FILE:Qt5::Widgets>) Thus under Linux everything (on a separate machine has not yet verified) seems to work, but the first question is still open.
export LD_LIBRARY_PATH=/../binyou think? - arrowd/bin. It is unlikely that your libraries are there. - arrowdwindeployqtand the corresponding utility for Linux? - vadrozh