]> Creatis software - gdcm.git/commitdiff
BUG: Apparently python2.5 do not like extension to have a .dll extension, we need...
authormalaterre <malaterre>
Tue, 29 Jan 2008 08:23:07 +0000 (08:23 +0000)
committermalaterre <malaterre>
Tue, 29 Jan 2008 08:23:07 +0000 (08:23 +0000)
gdcmPython/CMakeLists.txt

index 370a73373e337fd92c72e07433ec67afb5932700..932c9af282d5465fcbc76fa585540dc66c400735 100644 (file)
@@ -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 "")