The CMake build of the C++ binding uses the (deprecated since 3.12) FindPythonLibs script to locate the Python shared libraries.
This script does not appear to be compatible with an active Python virtual environment, and will default to using the system installation of Python. This can cause linker errors at the end of the build, as the system installation of Python may be the wrong version or have the wrong packages.
The CMakeLists should instead use the FindPython3 script, which has support for virtual environments via the Python3_FIND_VIRTUALENV hint, but only since CMake 3.15. This would require constraining the build further from its current requirement of CMake 3.10.
The CMake build of the C++ binding uses the (deprecated since 3.12)
FindPythonLibs
script to locate the Python shared libraries.This script does not appear to be compatible with an active Python virtual environment, and will default to using the system installation of Python. This can cause linker errors at the end of the build, as the system installation of Python may be the wrong version or have the wrong packages.
The CMakeLists should instead use the
FindPython3
script, which has support for virtual environments via thePython3_FIND_VIRTUALENV
hint, but only since CMake 3.15. This would require constraining the build further from its current requirement of CMake 3.10.