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. Install dependent libraries in qmake .pro file

Install dependent libraries in qmake .pro file

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 264 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.
  • S Offline
    S Offline
    Sebastian Mosiej
    wrote on last edited by
    #1

    Hi,
    I struggle to place binary and dependent libraries in one folder. For most cases I successfully provided relative paths in target.files. But this is brittle. Especially when dependent library builds other project.

    I would like to have some automatic mechanism to copy libraries on which my app depend.
    In Run section of kit configuration there's Add build library search path to LD_LIBRARY_PATH. I confirmed that QProcessEnvironment::systemEnvironment() returns LD_LIBRARY_PATH with those paths.

    How to do it?

    sierdzioS 1 Reply Last reply
    0
    • S Sebastian Mosiej

      Hi,
      I struggle to place binary and dependent libraries in one folder. For most cases I successfully provided relative paths in target.files. But this is brittle. Especially when dependent library builds other project.

      I would like to have some automatic mechanism to copy libraries on which my app depend.
      In Run section of kit configuration there's Add build library search path to LD_LIBRARY_PATH. I confirmed that QProcessEnvironment::systemEnvironment() returns LD_LIBRARY_PATH with those paths.

      How to do it?

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @Sebastian-Mosiej said in Install dependent libraries in qmake .pro file:

      How to do it?

      Just use rpath when linking your project.

      Or - probably better approach - deploy your app using linuxdeployqt, or flatpak, snap, DEB or RPM. This way the "heavy lifting" is already done for you and your users will be familiar with the way the app runs, links and works.

      (Z(:^

      1 Reply Last reply
      1

      • Login

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