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. QMAKE_POST_LINK in the subdirs template project. Or how can I run any commands after build of the ALL projects?

QMAKE_POST_LINK in the subdirs template project. Or how can I run any commands after build of the ALL projects?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.8k 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.
  • _ Offline
    _ Offline
    _Dima
    wrote on last edited by
    #1

    Could you please advise why QMAKE_POST_LINK doesn't work in the subdirs project?

    There is following subdirs project:
    @
    TEMPLATE = subdirs
    CONFIG += ordered

    SUBDIRS += project1
    SUBDIRS += project2

    #copy Qt dll's to the deploy directory
    QT_DLLS +=
    $$(Qt5_DIR)/bin/Qt5Core.dll
    $$(Qt5_DIR)/bin/Qt5Gui.dll

    DEPLOY_DIR = $$PWD/deploy

    win32:QT_DLLS ~= s,/,\,g
    win32:DEPLOY_DIR ~= s,/,\,g

    for(FILE,QT_DLLS){
    QMAKE_POST_LINK += $${QMAKE_COPY} $${FILE} $${DEPLOY_DIR}$$escape_expand(\n\t)
    }
    @

    This QMAKE_POST_LINK command works correct in the project1 or project2.

    And is there any way to run any command after build of the all projects in the subdirs project?
    I need also to run batch and bash files after all project's build.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      krussell9
      wrote on last edited by
      #2

      You can add a custom build step after the 'make' step in order to run batch or bash script files.

      However, to I also am in need of using something like QMAKE_POST_LINK in a subdirs project and would love to see an answer to your post.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        macetw
        wrote on last edited by
        #3

        ... because there is no "link" step in a subdirs template project. If you were building an "app" project, then you could use the QMAKE_POST_LINK, but in a subdirs project, it is ignored.

        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