[cmake-developers] [CMake 0015258]: 3.0.2-3.1rc2: _IMPORT_PREFIX always used even if absolute paths are in use - thus breaking build

Alex Merry alex.merry at kde.org
Mon Dec 8 17:25:18 EST 2014


On Monday 08 December 2014 23:16:52 Arkadiusz Miśkiewicz wrote:
> On Monday 08 of December 2014, Stephen Kelly wrote:
> > Arkadiusz Miśkiewicz wrote:
> > >> Removing CMAKE_INSTALL_LIBDIR from your command line might also cause
> > >> the correct files to be generated (why are you setting that?).
> > > 
> > > To ensure correct libdir gets used/set the one defined in rpm (package
> > > manager), not some kde/cmake one. Also user that uses rpm to build the
> > > package is allowed to redefine it like rpm --define '_libdir /blagblah',
> > > rpm passes that to cmake at cmdline.
> > 
> > Is there something equivalent for include dirs?
> 
> Yes, there is but it's not currently passed to cmake. libdir was passed
> because of lib vs lib64 issue and problems related to it in the past.
> 
> I could set includedir too but probably there is some other xxxdir that I'm
> not overriding and the whole problem will appear again, right? (unless there
> is some way to ensure that all required dirs were set at cmdline time).

A simpler fix would be to specify a relative path for the libdir (-
DCMAKE_INSTALL_LIBDIR=lib64 should work, I believe).

If you file a bug against extra-cmake-modules[0], I will investigate issuing a 
warning in KDEInstallDirs.cmake if you set some of BINDIR, LIBDIR and 
INCLUDEDIR to relative and some to absolute paths. I should also note the 
issue in the KDEInstallDirs.cmake documentation.

Alex




[0]: https://bugs.kde.org/enter_bug.cgi?product=extra-cmake-modules&format=guided



More information about the cmake-developers mailing list