happycube / ld-decode

Software defined LaserDisc decoder
GNU General Public License v3.0
307 stars 80 forks source link

CMake support for Python installation #799

Closed atsampson closed 2 years ago

atsampson commented 2 years ago

CMake now builds and installs the Python code in the same way that the old Makefile did, with some additional options to make it work with a separate object directory. This means it's now at parity with the old build system. As packagers may prefer to handle setup.py through their own Python mechanism, there's a BUILD_PYTHON option to skip this.

I've switched setup.py from distutils to setuptools. We tried this previously and it didn't work on older versions of Ubuntu. It's OK now, maybe because the CMake code is a bit more careful about always setting DESTDIR - setuptools interprets an empty --root as the current directory, which is wrong.

I've added a USE_QT_VERSION option, replacing SEARCH_QT5_ONLY, so that you can specify either version of Qt explicitly. The CI now uses this to avoid accidentally falling back to the wrong version.

CC @oyvindln.