Commit 26f302fe authored by David Gobbi's avatar David Gobbi
Browse files

COMP: Fix python module prefix/suffix in vtkMy and vtkLocal.

The two build examples, vtkMy and vtkLocal, were not setting the
prefix/suffix for the python modules.  On Windows, modules must
be built with a ".pyd" suffix, because the .dll suffix has been
deprecated since Python 2.5.  On Linux/Unix/OS X, modules should
have the "lib" prefix stripped.

Change-Id: I9b9c6bb1d4ab010a46a4b9237afd5d683b21a02e
parent bee52a20
......@@ -133,6 +133,10 @@ IF(VTK_FOUND)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}PythonD ${c}PythonD)
ENDFOREACH(c)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}Python ${PROJECT_NAME}PythonD)
SET_TARGET_PROPERTIES(${PROJECT_NAME}Python PROPERTIES PREFIX "")
IF(WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES(${PROJECT_NAME}Python PROPERTIES SUFFIX ".pyd")
ENDIF(WIN32 AND NOT CYGWIN)
ENDIF(VTK_WRAP_PYTHON)
# Create Java wrappers if VTK is wrapped in Java.
......
......@@ -30,6 +30,10 @@ IF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
ADD_LIBRARY (vtkmyCommonPython MODULE vtkmyCommonPythonInit.cxx)
TARGET_LINK_LIBRARIES(vtkmyCommonPythonD vtkmyCommon vtkCommon vtkCommonPythonD)
TARGET_LINK_LIBRARIES(vtkmyCommonPython vtkmyCommonPythonD)
SET_TARGET_PROPERTIES(vtkmyCommonPython PROPERTIES PREFIX "")
IF(WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES(vtkmyCommonPython PROPERTIES SUFFIX ".pyd")
ENDIF(WIN32 AND NOT CYGWIN)
ENDIF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
# Create the vtkmyCommon Java library.
......
......@@ -30,6 +30,10 @@ IF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
ADD_LIBRARY (vtkmyImagingPython MODULE vtkmyImagingPythonInit.cxx)
TARGET_LINK_LIBRARIES(vtkmyImagingPythonD vtkmyImaging vtkmyCommonPythonD vtkImaging vtkImagingPythonD)
TARGET_LINK_LIBRARIES(vtkmyImagingPython vtkmyImagingPythonD)
SET_TARGET_PROPERTIES(vtkmyImagingPython PROPERTIES PREFIX "")
IF(WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES(vtkmyImagingPython PROPERTIES SUFFIX ".pyd")
ENDIF(WIN32 AND NOT CYGWIN)
ENDIF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
# Create the vtkmyImaging Java library.
......
......@@ -41,6 +41,10 @@ IF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
ADD_LIBRARY (vtkmyUnsortedPython MODULE vtkmyUnsortedPythonInit.cxx)
TARGET_LINK_LIBRARIES(vtkmyUnsortedPythonD vtkmyUnsorted vtkmyCommonPythonD)
TARGET_LINK_LIBRARIES(vtkmyUnsortedPython vtkmyUnsortedPythonD)
SET_TARGET_PROPERTIES(vtkmyUnsortedPython PROPERTIES PREFIX "")
IF(WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES(vtkmyUnsortedPython PROPERTIES SUFFIX ".pyd")
ENDIF(WIN32 AND NOT CYGWIN)
ENDIF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
# Create the vtkmyUnsorted Java library.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment