Install file that will be created during build process



  • Hi,
    I have install section in my *.pro which copies built binaries to some location. I noticed that during first invoke of build proces, when the build directory is empty so it doesn't contain source files to be copied, the makefile doesn't contain install section for nonexisting files (my binaries to be copied naturally don't exist as they haven't been built yet). To fix this, I have to run qmake after first build to regenerate makefile which then contains install section for built binaries.

    How to fix that, i.e. how to install built binaries in one step?



  • there is a special install (called target) that can be used as described here: http://doc.qt.io/qt-5/qmake-advanced-usage.html#installing-files

    target "contains" in the file part your binaries

    target.path = destination/path/where/files/will/be/copied/to
    INSTALLS += target
    


  • @VRonin Thanks, that is helpful. However, in my case, only partially.

    I want also to copy files created during build, which are not consisted in special install called "target". Is there a possibility to copy them without invoking qmake/build several times?



  • @MartinD said in Install file that will be created during build process:

    I want also to copy files created during build

    can you explain what they are?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.