[QBS] Internal libraries, RPATH and Qt Creator
chgans at gna.org
Thu Apr 30 02:48:00 CEST 2015
I recently decided that it was time for me to give a go at using Qbs
(I've been using Qtc w/ qmake from day 1). My project has a typical
│ ├── app
│ ├── libs
│ └── plugins
As I didn't really know how to get started, I decided to have a look at
Qtc's own Qbs code, and to my surprise, it's quite simple and straight
So I ended up writing 4 custom items:
- LedaProduct (common base item)
I'm not using the plugin stuff yet (I haven't written the loader), so
for now my plugins are based on LedaLibrary, and the app includes the
plugins header, link against the fake plugins and do all the setup
Anyway, all build fine, but I'm having problems resolving the library
loader path at runtime (using qtcreator).
I have tried to use "cpp.rpaths: [project.buildDirectory + "/" +
project.leda_library_path]" in LedaApplication, but it screws up the
linking of my app (there's a -l/fullpath/.socopy/libfoo.so that appears
on the command line).
So my question is how do I set up my Qbs files so that I can run my app
(without installing files) using the Qt Creator "run" command? (note: of
course I still want too to be able to do a local or system install and
run the app from there)
My question concerns both app/libs dependencies but as well lib/lib and
plugin/lib ones too.
It would be nice if someone could shed some light on this, or point me
to an example or documentation.
Thanks, and long live qbs!
More information about the Qbs