Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    [SOLVED] qmake make and install target

    General and Desktop
    qmake make installation target
    1
    2
    11460
    Loading More Posts
    • 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
      eddystefes last edited by eddystefes

      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 Reply Quote 0
      • E
        eddystefes last edited by

        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 Reply Quote 0
        • First post
          Last post