diff options
-rw-r--r-- | Modules/FindPythonLibs.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake index d12f14a..283c914 100644 --- a/Modules/FindPythonLibs.cmake +++ b/Modules/FindPythonLibs.cmake @@ -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) |