From: malaterre Date: Tue, 29 Jan 2008 08:23:07 +0000 (+0000) Subject: BUG: Apparently python2.5 do not like extension to have a .dll extension, we need... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=a8630a49a397462841dcd629e8f38083c0800151;p=gdcm.git BUG: Apparently python2.5 do not like extension to have a .dll extension, we need to rename them to .pyd (dont ask why) --- diff --git a/gdcmPython/CMakeLists.txt b/gdcmPython/CMakeLists.txt index 370a7337..932c9af2 100644 --- a/gdcmPython/CMakeLists.txt +++ b/gdcmPython/CMakeLists.txt @@ -74,7 +74,15 @@ IF(GDCM_VTK) VTK_WRAP_PYTHON2(vtkgdcmPython gdcmWrapSOURCES ${vtkgdcmPython_la_SOURCES}) # The C++ files must be made into a C++ library - ADD_LIBRARY(vtkgdcmPython SHARED ${gdcmWrapSOURCES}) #MODULE on apple ? + ADD_LIBRARY(vtkgdcmPython MODULE ${gdcmWrapSOURCES}) #MODULE on apple ? + + # Python extension modules on Windows must have the extension ".pyd" + # instead of ".dll" as of Python 2.5. Older python versions do support + # this suffix. + IF(WIN32 AND NOT CYGWIN) + SET_TARGET_PROPERTIES(vtkgdcmPython PROPERTIES SUFFIX ".pyd") + ENDIF(WIN32 AND NOT CYGWIN) + # set the libraries to link against #SET_TARGET_PROPERTIES(${foobar} PROPERTIES PREFIX "")