From a8630a49a397462841dcd629e8f38083c0800151 Mon Sep 17 00:00:00 2001 From: malaterre Date: Tue, 29 Jan 2008 08:23:07 +0000 Subject: [PATCH] BUG: Apparently python2.5 do not like extension to have a .dll extension, we need to rename them to .pyd (dont ask why) --- gdcmPython/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 "") -- 2.45.1