Skip to content

Fixed broken install prefix setting

metacollin requested to merge github/fork/metacollin/master into master

This does not work for macOS users. It will try to install to /usr/local/share/kicad (which does not exist) and fails without installing anything.

This is caused by how CMAKE_INSTALL_PREFIX is being handled. Without using FORCE because the project ( ) command, whose job is to setup the basic variables needed, will have already set CMAKE_INSTALL_PREFIX. Some older versions of cmake with an incomplete implementation of project don't set the install prefix, allowing this to accidentally work. That is not the intended behavior however, nor does it work with recent versions of cmake.

This commit fixes the problem by using the canonical way to handle the CMAKE_INSTALL_PREFIX according to the cmake developers: https://public.kitware.com/pipermail/cmake/2010-December/041135.html

Merge request reports