[cmake-developers] usr-move v. cross-compiling
Alexander Neundorf
neundorf at kde.org
Sat Apr 6 13:18:56 EDT 2013
On Saturday 06 April 2013, Alexander Neundorf wrote:
> On Wednesday 03 April 2013, Brad King wrote:
> > On 04/01/2013 10:25 AM, Brad King wrote:
> > > http://www.cmake.org/Bug/view.php?id=14041
> > >
> > > Our usr-move changes to hard-code the "/usr" prefix conflicts with
> > > cross-compiling cases where the host side relocates a package
> > > under some new root and finds it with CMAKE_FIND_ROOT_PATH.
> >
> > Here is a fix using a new approach to support usr-move:
> > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c613b43
> >
> > While implementing this I realized the old approach was not
> > fully implemented in configure_package_config_file anyway
> > because while not referencing PACKAGE_PREFIX_DIR it would
> > still leave that variable set improperly after PACKAGE_INIT.
> > The new approach restores the original references to
> > PACKAGE_PREFIX_DIR in all cases but adds code to fix its
> > value in the usr-move case.
>
> Thanks, I'll have a closer look at it later today.
So the new code is actually:
at usage-time, if the file was supposed to be installed into /lib or /usr/lib,
resolve any symbolic links from the file's actual location and the original
install location, and if those are the same, use the original install prefix.
Yes, I think that's much better than my previous fix, since it now decides at
usage time what to do.
Thanks
Alex
More information about the cmake-developers
mailing list