Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Copy files with qmake to ouput directory from an external directory?
Qt 6.11 is out! See what's new in the release blog

Copy files with qmake to ouput directory from an external directory?

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 3.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    Zingam
    wrote on last edited by
    #1

    I use this in my .pro files to copy files to the build output directory:

    @DESTDIR = ../bin__output__
    assets.path = $$DESTDIR/assets
    assets.files += $$files(assets/.)

    INSTALLS += assets@

    Now I want to copy files that are located in "/usr/lib..." into the build ouput directory. Of course I want to copy them only if they do not already exist or if they have been modified in the build output directory.
    And I want to do this on Linux (and then on Windows).

    I checked a few suggestions but none of them worked like these "here":http://stackoverflow.com/questions/3984104/qmake-how-to-copy-a-file-to-the-output.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      This "post":http://qt-project.org/forums/viewthread/48490/#198704 might be of help

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        Zingam
        wrote on last edited by
        #3

        Thanx. The solution in your link doesn't look any different than the one in the link I've posted. Does it really work for files/directories that are outside of the project tree?
        It's too late for me to try today.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Yes, it calls the platform copy functions so you can give it any path you want

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved