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:
parent
42fd9a596f
commit
d36c16a760
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue