[C++-sig] CMake and getting starting with boost.python
Francesco Biscani
bluescarni at gmail.com
Tue Aug 21 19:43:11 CEST 2007
On Friday 29 June 2007, Braddock Gaskill wrote:
> LINK_LIBRARIES(boost_python)
> INCLUDE_DIRECTORIES("/usr/include/python2.5")
> LINK_DIRECTORIES("/usr/lib/python2.5") # Not needed?
> ADD_LIBRARY(hello SHARED hello.cpp)
> EOF
>
> You WILL have to `mv libhello.so hello.so` after building.
>
You can avoid renaming the shared object like this:
SET_TARGET_PROPERTIES(hello PROPERTIES PREFIX "")
This way the shared library won't have the "lib" prefix.
BTW, I'm using CMake + Boost.Python and I'm happy about it, the only issue I
have is that I can't compile it under Windows (MinGW) because of some
dllimport errors. Have you had any experience about it?
Regards,
Francesco.
More information about the Cplusplus-sig
mailing list