[cmake] Force ".so" suffix for pybind11 module libraries on macOS
The issue is discussed in this old thread on stackoverflow: https://stackoverflow.com/questions/2488016/how-to-make-python-load-dylib-on-osx
Somehow Python refuses to import dynamic libraries with the suffix .dylib
(I get an import error) which is the common suffix for shared libs in macOS. Telling CMake to use .so
instead as suggested in the stackoverflow thread works for me.
The Python libs on for my Python 3.7 from homebrew all have .so
endings just like in the stackoverflow answer.
Fixes #201 (closed)
Edited by Timo Koch