← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Don't reference CMAKE_INSTALL_PREFIX in installation paths

 

Hi Simon,

without testing it, but just reading the documentation for gnuinstalldirs,
it seems that the CMAKE_INSTALL_<dir> variables contains the relative path,
while the CMAKE_INSTALL_FULL_<dir> should contain a full path, hence it
should work here as it will be share again.

Nick

2018-04-30 17:02 GMT+02:00 Simon Richter <Simon.Richter@xxxxxxxxxx>:

> Hi Nick,
>
> On 30.04.2018 16:35, Nick Østergaard wrote:
>
> > @Simon, does MAKE_INSTALL_DATADIR work for gnu stow? If so, I guess it
> > is safer to use that variable, as we do elsewhere.
>
> The problem I'm addressing with my patch is configure time vs. install
> time path resolution -- if you explicitly use the variable there, you
> generate an absolute path at configure time, and it remains absolute
> during installation, while a relative path has a variable reference
> implicitly prepended to it which is resolved at install time.
>
> So using CMAKE_INSTALL_DATADIR wouldn't work, what is needed is some way
> to say "relative to whatever the variable is set to during installation".
>
> The traditional way to install with stow is to configure for a prefix of
> /usr/local, then override that as /usr/local/DIR/kicad for installation
> and symlink the files into the /usr/local tree -- that way, if you have
> compiled-in paths, they will use the /usr/local prefix, so the software
> will only be a tiny bit confused if it expects its data files not to be
> symlinks).
>
> This is very close to what we do with DESTDIR (which is what most
> distros use), but works without an extra renaming step.
>
>    Simon
>
>

References