Pulse-Eight / libcec

USB CEC Adapter communication Library http://libcec.pulse-eight.com/
Other
714 stars 287 forks source link

Wrong PYTHON_PKG_DIR selected for cross-build #530

Open ydirson opened 4 years ago

ydirson commented 4 years ago

When cross-building on a Debian host machine, the following believes the target is a Debian OS:

      if(EXISTS "/etc/os-release")
        file(READ "/etc/os-release" OS_RELEASE)
        string(REGEX MATCH "ID(_LIKE)?=debian" IS_DEBIAN ${OS_RELEASE})
        if (IS_DEBIAN)
          SET(PYTHON_PKG_DIR "dist-packages")
        endif()
      endif()

Further more, using -DPYTHON_PKG_DIR=site-packages does not seem to have any effect, despite the value being recorded in CMakeCache.txt, maybe because it is not set as a cached variable, or because this code sets it unconditionally ?