Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Fixed broken install prefix setting #450

Closed
wants to merge 1 commit into from

Conversation

metacollin
Copy link

@metacollin metacollin commented Mar 22, 2018

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

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
@CLAassistant
Copy link

CLAassistant commented Mar 22, 2018

CLA assistant check
All committers have signed the CLA.

@poeschlr
Copy link
Collaborator

The same change for the symbol repo is done in KiCad/kicad-symbols#409

@metacollin does the 3d model repo also require something similar?

@poeschlr
Copy link
Collaborator

I asked the developers for input on this one. (As i don't know enough about cmake)
https://lists.launchpad.net/kicad-developers/msg35113.html

@metacollin
Copy link
Author

@poeschlr Thank you for taking the time to post this on the mailing list, I'm reading through the thread right now. It looks like I might need to use something other than CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT to achieve a similar effect.

Anyway, thanks again!

@antoniovazquezblanco
Copy link
Collaborator

What is the status on this issue @metacollin?
It seems you have been trying to solve two different issues and one have been fixed by the following line:

file (GLOB PRETTY_DIRS "*.pretty")

But I do not know enough to check wether the other issue is gone.

Thank you!

@poeschlr
Copy link
Collaborator

The devs where not happy with the proposed solution so i would guess this can be closed.

@poeschlr poeschlr closed this Aug 27, 2018
@myfreescalewebpage myfreescalewebpage added Abandoned Original author has stopped working on the PR Bug Fix footprint existing in the library labels May 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Abandoned Original author has stopped working on the PR Bug Fix footprint existing in the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants