[CMake] Python Extension

Rich Holm rholm at qltrading.com
Wed Jan 4 16:36:25 EST 2006


Thanks for the help!

Do I use ADD_LIBRARY() to build it in UNIX and Windows?
I need to build a python extension that can also export
some functions for other extensions to use.

Cheers,
Rich


William A. Hoffman wrote:
> On unix this should work:
> 
>  SET_TARGET_PROPERTIES(target   PROPERTIES SUFFIX pyd)
> 
> However, for windows, currently you would have to use
> a custom command to copy the .dll to a .pyd file.
> We are working on fixing this inconsistency. 
> 
> -Bill
>                       
> 
> At 03:15 PM 1/4/2006, Rich Holm wrote:
> 
> 
>>Are there any rules to create python extensions with an extension of
>>.pyd in windows?   Right now, my CMakeLists.txt just build .dll files.
>>
>>Also, how would one make a python extension under UNIX?  Is it
>>easy to create links to a shared library under UNIX after the build?
>>
>>Thanks.  I have the CMake book, but can't find any info on python
>>extensions and shared objects (other than libraries).
>>
>>Cheers,
>>Rich
>>
>>_______________________________________________
>>CMake mailing list
>>CMake at cmake.org
>>http://www.cmake.org/mailman/listinfo/cmake
> 
> 
> 




More information about the CMake mailing list