Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved Shared Library: Copying after build (Install)

    General and Desktop
    4
    5
    1048
    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.
    • F
      fem_dev last edited by fem_dev

      I have a shared library Qt project and I would like to copy the output *.dll or *.so file to another custom destination after build.
      I'm using Windows now, but this solution must be cross-platform (Windows, Linux and Mac).

      I tried something like:

      shared_lib.path = "C:/Users/lamar/Desktop/shared_lib_folder" # valid only in Windows enviroment
      shared_lib.files += $$OUT_PWD/debug/my_shared_lib.dll # or *.so or *.dylib
      INSTALLS += shared_lib
      

      Thanks,

      F 1 Reply Last reply Reply Quote 1
      • F
        fem_dev @fem_dev last edited by

        @fem_dev I solve that creating a Windows *.bat file that copies my shared libraries to another folder...

        aha_1980 1 Reply Last reply Reply Quote 0
        • aha_1980
          aha_1980 Lifetime Qt Champion @fem_dev last edited by

          Hi @fem_dev,

          note that you can use scopes to create cross-platform install steps.

          Regards

          Qt has to stay free or it will die.

          1 Reply Last reply Reply Quote 3
          • C
            Chrisw01 last edited by

            I know you already solved this but I ran across a library today that utilized QMAKE_POST_LINK that may work better for you.

            Here is one site from google.

            QMake - how to copy a file to the output

            Maybe more what you're looking for...

            Take Care

            1 Reply Last reply Reply Quote 2
            • JKSH
              JKSH Moderators last edited by

              Another way is to add make install as a custom build step in Qt Creator: https://doc.qt.io/qtcreator/creator-build-settings.html

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              1 Reply Last reply Reply Quote 3
              • First post
                Last post