python3_add_library on Windows in Debug mode wrongly names the module
python3_add_library
with SO_ABI
module target creates the libraries in
- Debug mode -
mymoduled.cp39-win_amd64.pyd
- Release mode -
mymodule.cp39-win_amd64.pyd
I can not import the python module in debug mode because the module name mymodule
is different from the file name of the module mymoduled
.
To fix this, I think CMAKE_DEBUG_POSTFIX
should be unset for python3_add_library
in Debug mode too