Merge topic 'python_module_prefix_suffix'

d36c16a Set the module prefix, updated Windows suffix.
This commit is contained in:
Brad King 2010-09-28 14:04:24 -04:00 committed by CMake Topic Stage
commit e66c12a265
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}) ADD_LIBRARY(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
# TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES}) # 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}) ENDIF(PYTHON_ENABLE_MODULE_${_NAME})
ENDFUNCTION(PYTHON_ADD_MODULE) ENDFUNCTION(PYTHON_ADD_MODULE)