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] qmake make and install target
QtWS25 Last Chance

[SOLVED] qmake make and install target

Scheduled Pinned Locked Moved General and Desktop
qmakemakeinstallationtarget
2 Posts 1 Posters 13.1k Views
  • 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.
  • E Offline
    E Offline
    eddystefes
    wrote on 23 Jun 2015, 10:02 last edited by eddystefes
    #1

    hi,

    I am trying to add the make install make target to my project. I added all my configfiles, external librarys, etc as target to the INSTALLS variable. This works nice.

    My problem now is:
    How do I add the compilation output to INSTALLS?

    I tried doing this:

    target.files += $$OUT_PWD/$(DESTDIR)/$(TARGET)
    target.path += /somewhere/to/install
    INSTALLS += target
    

    using this from the commandline works for dynamic-library projects. But if I try to open the .pro with QtCreator, QtCreator it will crash.

    Also the documentation says: Note that qmake will skip files that are executable. If you need to install executable files, you can unset the files' executable flags.

    How does this make sens? how is somebody supposed to create an install target if it is not possible to add the compilation executable to the installation.

    1 Reply Last reply
    0
    • E Offline
      E Offline
      eddystefes
      wrote on 23 Jun 2015, 11:47 last edited by
      #2

      ok found the solution:

      in my .pro i hat a typo:

      target.files = config.conf ....    // wrong
      _____________^_________
      

      this needs to be:

      target.files += config.conf  // right
      _____________^_________
      

      also I hade multiple installation-targets and did not add target to installs in every build configuration.

      so for those who run in the same problem:

      1. be sure you add target to INSTALLS, target.files is already filled with your compilation output.
      2. use += not = to add other files
      1 Reply Last reply
      0

      2/2

      23 Jun 2015, 11:47

      • Login

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