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 fails when more than one exist in .pro file
Qt 6.11 is out! See what's new in the release blog

QMAKE_POST_LINK fails when more than one exist in .pro file

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 430 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
    Vinoth Rajendran4
    wrote on last edited by Vinoth Rajendran4
    #1

    Hi All,
    My scenario is, i need to copy some external third party shared libraries as well as qt dependent libraries into the executable path.

    Here is my .pro file code snippet,

    # to copy shared libraries and third party exe to output dir
    CONFIG( debug, debug|release ) {
    
    #debug
        FILELIST +=  $$PWD/libs/*.dll                       \   # stdfu libraries
                     $$PWD/7z/*.exe                             \   # 7za.exe
                     $$PWD/azure/v140/Win32/Debug/*.dll     \   # azure debug libraries
                    
    
       TARGET_DEST  = $$OUT_PWD/debug
       TARGET_DEST ~= s,/,\\,g # fix slashes
    } else {
    
    #release
        FILELIST +=  $$PWD/libs/*.dll                       \   # stdfu libraries
                     $$PWD/7z/*.exe                             \   # 7za.exe
                     $$PWD/azure/v140/Win32/Release/*.dll     \   # azure debug libraries
                    
        TARGET_DEST  = $$OUT_PWD/release
        TARGET_DEST ~= s,/,\\,g # fix slashes
    }
    
    
    for(file, FILELIST) {
        message($${file})
        TARGET_SRC  = $${file}
        TARGET_SRC  ~= s,/,\\,g # fix slashes
    
        QMAKE_POST_LINK +=$$quote(cmd /c copy /y $${TARGET_SRC} $${TARGET_DEST}$$escape_expand(\n\t))
    }
    
    
    CONFIG( debug, debug|release ) {
        # debug
        QMAKE_POST_LINK += windeployqt --qmldir $$PWD/resources $$OUT_PWD/debug
    } else {
        # release
        QMAKE_POST_LINK += windeployqt --qmldir $$PWD/resources $$OUT_PWD/release
    }
    
    1. In this case only third party libraries are copied successful into output directory.
    2. windeployqt fails to deploy .

    If i comment third party libraries deployment code , then windeployqt deploys sucessfully.

    Can someone please help me understand why QMAKE_POST_LINK fails, if i try do both operation ?

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

      Hi,

      You should check that the variable content is properly separated.

      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