Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Copying all executables to a given directory while using the SUBDIRS qmake template
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Copying all executables to a given directory while using the SUBDIRS qmake template

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 3.7k 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.
  • V Offline
    V Offline
    valandil211
    wrote on last edited by
    #1

    Hello everyone!

    I'm currently using the SUBDIRS template in qmake to allow the creation of multiple executables in a single project.

    Is there a way to tell qmake or Qt Creator to copy all executables created in a single predetermined directory after compilation? I've Googled a bit for it and searched the documentation, but found nothing on that. Thanks!

    Here's my .pro file.

    @TEMPLATE = subdirs

    SUBDIRS +=
    1-1DControl
    2-OGYControl
    3-MEDControl
    4-NoiseInfluence
    BifurcationDiagram@

    Joey Dumont

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tomma
      wrote on last edited by
      #2

      See http://qt-project.org/doc/qt-4.8/qmake-variable-reference.html#destdir

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tucnak
        wrote on last edited by
        #3

        You can set DESTDIR qmake derective which allow to set directory to build executables there.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Asperamanca
          wrote on last edited by
          #4

          I haven't been happy with setting variables in the subdirs .pro-file.

          My solution was to create a global .pri file (in the same folder as the subdirs-pro-file) that every other .pro file has to include.

          1 Reply Last reply
          0
          • V Offline
            V Offline
            valandil211
            wrote on last edited by
            #5

            Thanks for the link: I hadn't seen it on my search. I added a line to each .pro file in the subdirs template project.

            Thanks!

            Joey Dumont

            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