[Interest] qmake: Building a shared object which is not a lib

2012-06-27 Thread Christian Gagneraud
Hi there,

I would like to build a shared object (PySide module) using qmake.
My first attempt was to use TEMPLATE=lib, which worked except that I 
have no control on the name of the output file.
Is there a way to override the name of the generated shared object file?

Basically using TEMPLATE=lib, the generated file is called 
libXYZ.so.1.0.0 (and the usual links to it up to libXYZ.so). I would 
like to generate instead XYZ.so, without any versioning, links, etc...

Any help would be grateful.

Chris


-- 
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/

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake: Building a shared object which is not a lib

2012-06-27 Thread Andreas Pakulat
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 
  ch...@techworks.iejavascript:;
 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.

Andreas
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qmake: Building a shared object which is not a lib

2012-06-27 Thread Christian Gagneraud
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
 ch...@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/


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest