Index: cmake-3.1.0/Modules/UseSWIG.cmake =================================================================== --- cmake-3.1.0.orig/Modules/UseSWIG.cmake +++ cmake-3.1.0/Modules/UseSWIG.cmake @@ -260,7 +260,7 @@ macro(SWIG_ADD_MODULE name language) set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "") elseif ("${swig_lowercase_language}" STREQUAL "python") # this is only needed for the python case where a _modulename.so is generated - set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "") + set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "_") # Python extension modules on Windows must have the extension ".pyd" # instead of ".dll" as of Python 2.5. Older python versions do support # this suffix.