Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved]how to setup Multiple DESTDIR?

[Solved]how to setup Multiple DESTDIR?

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 3 Posters 4.6k 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.
  • D Offline
    D Offline
    dreamerindia
    wrote on last edited by
    #1

    Hi friends,

    How to have multiple DESTDIR for my project.

    In my team, other developers also using my code and testing it in the embedded system.So whatever the changes i do in my .so files should reflect in their system also.

    copying and pasting the .so 's every time is annoying.

    Whenever i build my project, it should automatically update .so file in the more than one directory.How to do that?

    ~Ravivarman~

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Copy it using a command passed to QMAKE_POST_LINK. Just be aware of "this":https://qt-project.org/forums/viewthread/31214/.

      (Z(:^

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dreamerindia
        wrote on last edited by
        #3

        thank you.

        this works when i add it in .pro file.

        QMAKE_POST_LINK += cp /exports/nfsroot-ccwmx51js/home/libFGInterface.so /mnt/TestingPC/nfsroot-ccwmx51js/home/libFGInterface.so

        i can get libFGInterface.so in both
        /exports/nfsroot-ccwmx51js/home/ &
        /mnt/TestingPC/nfsroot-ccwmx51js/home/

        :-)

        ~Ravivarman~

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Great! Happy coding!

          (Z(:^

          1 Reply Last reply
          0
          • C Offline
            C Offline
            compor
            wrote on last edited by
            #5

            or you can add an INSTALLS target that will perform the additional copies upon installing to your main DESTDIR.

            e.g.

            @
            equals(TEMPLATE, lib) {
            target.path = $${DESTDIR} # or whatever other dir
            target.extra = cp $${QMAKE_PREFIX_SHLIB}$${TARGET}.$${QMAKE_EXTENSION_SHLIB} /dir1; cp $${QMAKE_PREFIX_SHLIB}$${TARGET}.$${QMAKE_EXTENSION_SHLIB} /dir2; # etc
            INSTALLS += target
            }
            @

            this will work only if the template is for creating shared libs.
            on my box QMAKE_EXTENSION_SHLIB wasn't set, if that is the case just stick the ".so" suffix manually

            this will require performing "make install" but has the advantage of keeping things separate.

            purposes as understood by the purposer will be misunderstood by others

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dreamerindia
              wrote on last edited by
              #6

              @compor,

              I added this code in my pro,but only it generated output in DESTDIR. anything i'm missing?

              @equals(TEMPLATE, lib) {
              target.path = $${DESTDIR} # or whatever other dir
              target.extra = cp $${QMAKE_PREFIX_SHLIB}$${TARGET}.$${QMAKE_EXTENSION_SHLIB} /exports/nfsroot-ccwmx51js/home; cp $${QMAKE_PREFIX_SHLIB}$${TARGET}.$${QMAKE_EXTENSION_SHLIB} /mnt/ElangovanPC/nfsroot-ccwmx51js/home;
              INSTALLS += target
              }@

              ~Ravivarman~

              1 Reply Last reply
              0
              • C Offline
                C Offline
                compor
                wrote on last edited by
                #7

                make sure the command has ended up in the generated Makefile (just search for it in there) and then you need to do a "make install".

                purposes as understood by the purposer will be misunderstood by others

                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