[bb2] lib target - change extension

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[bb2] lib target - change extension

Jaroslav Gresula
Is there a way how one can change extension of a binary built by a lib target
(e.g. instead of .dll/.so I would like to have .pyd)?

Thanks,
Jarda


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [bb2] lib target - change extension

Vladimir Prus
On Wednesday 01 March 2006 13:29, Jaroslav Gresula wrote:
> Is there a way how one can change extension of a binary built by a lib
> target (e.g. instead of .dll/.so I would like to have .pyd)?

Take a look at how it's done in python.jam:

  type.register PYTHON_EXTENSION : : SHARED_LIB ;
  # We can't give "dll" suffix to PYTHON_EXTENSION, because
  # we would not know what "a.dll" is: python extenstion or
  # ordinary library. Therefore, we specify only suffixes
  # used for generation of targets.
  type.set-generated-target-suffix PYTHON_EXTENSION : : so ;
  type.set-generated-target-suffix PYTHON_EXTENSION : <os>NT : dll ;
  type.set-generated-target-suffix PYTHON_EXTENSION : <os>CYGWIN : so ;

With the above, if you use:

  python-extension whatever : a.cpp ;

the extension will be determined by the statements above. You can adapt this
to your case.

HTH,
Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build