sierrafoxtrot / srecord

SRecord github Mirror
https://srecord.sourceforge.net/
GNU General Public License v3.0
42 stars 22 forks source link

cmake: respect explicit install prefix #68

Open iillyyaa opened 6 months ago

iillyyaa commented 6 months ago

If CMAKE_INSTALL_PREFIX was supplied externally, use it. This follows the pattern suggested by cmake documentation in: https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT.html

I took the liberty of removing (rather than fixing) the commented out line of code, because that reduces the testing surface I needed to cover. I hope that is acceptable.

The original motivation for this fix is that srecord is packaged in yocto project's meta-openembedded layer, and its ignoring of the install prefix prevents it from staging correctly into the destination sysroot.

This addresses Issue #65