diff options
author | David Gobbi <david.gobbi@gmail.com> | 2010-09-24 19:04:24 (GMT) |
---|---|---|
committer | Marcus D. Hanwell <marcus.hanwell@kitware.com> | 2010-09-24 19:04:24 (GMT) |
commit | d36c16a7609d3329dc32ae800570a0a06dea628e (patch) | |
tree | 574967738307b325e6282f0b90305351e86baa87 /Modules/FindPythonLibs.cmake | |
parent | 42fd9a596fdc300855f5c8d2f755c0a2181ffd34 (diff) | |
download | CMake-d36c16a7609d3329dc32ae800570a0a06dea628e.zip CMake-d36c16a7609d3329dc32ae800570a0a06dea628e.tar.gz CMake-d36c16a7609d3329dc32ae800570a0a06dea628e.tar.bz2 |
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.
Diffstat (limited to 'Modules/FindPythonLibs.cmake')
-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) |