[Interest] qmake: Building a shared object which is not a lib
Christian Gagneraud
chris at techworks.ie
Wed Jun 27 19:52:15 CEST 2012
On 27/06/12 18:26, Andreas Pakulat wrote:
> Hi,
>
> Am Mittwoch, 27. Juni 2012 schrieb Christian Gagneraud :
>
> On 27/06/12 12:32, Mandeep Sandhu wrote:
> > On Wed, Jun 27, 2012 at 4:29 PM, Christian Gagneraud
> <chris at techworks.ie <javascript:;>> wrote:
> >> Hi there,
> >>
> [...]
> >
> > If you build a plugin, then the version links are not created, and
> > simply the libXYZ.so will be created (the lib prefix is still there).
> >
> > Why do you want to remove the lib prefix btw?
>
> Because this is not a typical unix library, this is a python module and
> as such it has to be named XYZ.so. Then from python you can do an
> "import XYZ". If you name it libXYZ.so, you'll have to do "import
> libXYZ".
>
>
> IIRC, qmake also has either a plugin config option or even a template
> for that. I'd suggest to look at an example for a qt plugin, for example
> a designer plugin or something in the qtcreator sources. Plugins have
> the same logic to drop the lib prefix since they are loaded direct,y via
> dlopen.
Thanks a lot for pointing me out this, after googling a bit I found how
to do exactly why I needed:
QT += core
CONFIG += link_pkgconfig plugin no_plugin_name_prefix
PKGCONFIG += pyside
TARGET = XYZ
TEMPLATE = lib
SOURCES = ...
HEADERS = ...
Easy baby! ;)
And I guess (hope) that it is cross-platform friendly.
Now I just need to get the wrapper generation handled by qmake as well.
Chris
>
> Andreas
--
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/
More information about the Interest
mailing list