Set the module prefix, updated Windows suffix.

Set the Python module prefix to PYTHON_MODULE_PREFIX, and changed the
suffix on Windows to .pyd as .dll is officially deprecated.
This commit is contained in:
David Gobbi 2010-09-24 15:04:24 -04:00 committed by Marcus D. Hanwell
parent 42fd9a596f
commit d36c16a760
1 changed files with 7 additions and 0 deletions

View File

@ -128,6 +128,13 @@ FUNCTION(PYTHON_ADD_MODULE _NAME )
ADD_LIBRARY(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
# TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES})
IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
SET_TARGET_PROPERTIES(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
IF(WIN32 AND NOT CYGWIN)
SET_TARGET_PROPERTIES(${_NAME} PROPERTIES SUFFIX ".pyd")
ENDIF(WIN32 AND NOT CYGWIN)
ENDIF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
ENDIF(PYTHON_ENABLE_MODULE_${_NAME})
ENDFUNCTION(PYTHON_ADD_MODULE)