Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. qbs How to add @rpath to third party dependency?
QtWS25 Last Chance

qbs How to add @rpath to third party dependency?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qbsmacos
2 Posts 2 Posters 642 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.
  • M Offline
    M Offline
    Marc_H
    wrote on last edited by
    #1

    We are using paho MQTT client and have paho.qbs file, which looks like this:

    //paho.qbs
    Product {
        qbs.installPrefix: project.installPrefix
        
       //abbreviated windows and linux groups
    
        Group {
            name: "Binaries (macOS)"
            condition: qbs.targetOS.contains("darwin")
    
            files: ["mac/lib/*"]
    
            qbs.install: true
            qbs.installDir: "bin"
        }
    
        Export {
            Depends { name: "cpp" }
    
            //abbreviated windows and linux properties
    
            Properties {
                condition: qbs.targetOS.contains("darwin")
    
                cpp.includePaths: ["mac/include"]
                cpp.dynamicLibraries: ["paho-mqtt3as", "paho-mqtt3cs"]
                cpp.libraryPaths: ["mac/lib"]
            }        
        }
    }
    

    Other libraries depend on this and everything compiles and links fine, but running an application with dependency on paho requires the working directory to be where the paho libs are located.

    Output of otool:

    //...
    Load command 22
              cmd LC_LOAD_DYLIB
          cmdsize 48
             name libpaho-mqtt3as.1.dylib (offset 24)
       time stamp 2 Thu Jan  1 01:00:02 1970
          current version 1.3.8
    compatibility version 1.0.0
    //...
    

    Is it possible to add @rpath to the load command?
    Any help is appreciated. ✌🏼

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by
      #2

      You can also ask a Qbs question on a Discord server: https://discord.gg/ZXT6YKq (right now all Qbs developers and users live there). ;)

      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