buresu / ndi-python

NewTek NDI Python wrapper
MIT License
133 stars 30 forks source link

Pass -DPYTHON_EXECUTABLE to cmake #25

Open minoki opened 1 year ago

minoki commented 1 year ago

When building ndi-python with virtualenv without activating it, cmake tries to find system-installed python:

$ # No myenv/bin/activate!
$ myenv/bin/python setup.py build
...
-- Found PythonInterp: <some system-installed python>
-- Found PythonLibs: <some system-installed python>
...

This is not good because the version of found one might be different than virtualenv's one.

Therefore, cmake's PYTHON_EXECUTABLE variable should be explicitly set by setup.py.