Include extra files in build/deployment



  • I want to include an entire folder in the build/deployment of my Qt project.

    I have this in my .pro file:

    html_folder.source = html
    html_folder.target = .
    DEPLOYMENTFOLDERS = html_folder
    
    ...
    
    defineTest(addHTML) {
        for(deploymentfolder, DEPLOYMENTFOLDERS) {
            item = item$${deploymentfolder}
            itemsources = $${item}.files
            $$itemsources = $$eval($${deploymentfolder}.source)
            itempath = $${item}.path
            $$itempath= $$eval($${deploymentfolder}.target)
            export($$itemsources)
            export($$itempath)
            DEPLOYMENT += $$item
        }
    
        export (DEPLOYMENT)
    }
    
    addHTML()
    

    That used to work with Qt 4.x, maybe even 5.x, but now I'm trying to port my project to 5.7 and it's not working, as in, it's not copying my folder to the build/deployment folder.

    What changed caused this to stop working? How can I make it work again?


Log in to reply
 

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