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

Stephen Kelly steveire at gmail.com
Mon Dec 8 14:38:30 EST 2014


Arkadiusz Miśkiewicz wrote:

> On Monday 08 of December 2014, Mantis Bug Tracker wrote:
> 
>> ----------------------------------------------------------------------
>>  (0037414) Stephen Kelly (developer) - 2014-12-08 19:46
>>  http://public.kitware.com/Bug/view.php?id=15258#c37414
>> ----------------------------------------------------------------------
>> The problem is that you change some relative paths to absolute paths by
>> setting some variables them on the command line, but you don't set all
>> necessary paths. You need to set the include dir to an absolute path too.
> 
> So if I want to override single path then I need to set all of them,
> always?

The details of this depend on the variables used by the KDE frameworks, eg 
KDEInstallDirs.cmake.  

The KDE mailing list might have advice for packagers based on the contents 
of that file.

> Also question - /usr/lib64/cmake/KF5CoreAddons/KF5CoreAddonsTargets.cmake
> comes from package A.
> 
> Assume that A was built using relative paths.
> 
> Now there is separate package B that wants to use
> KF5CoreAddonsTargets.cmake but it also wants to use absolute paths.

That is not a problem. This no-mixing requirement is per-package.

> Is
> that forbidden (A build using relative, B absolute) then ? If I understand
> your comment correctly - the way A was built forces the same way on all
> other software that uses As cmake files.

This is something you might have to investigate with the KDE list. CMake has 
no problem with it in principle.

>> I added a new diagnostic to recognize this in CMake 3.2.
> 
> Could you point me to commit, so I'll try to backport?

You should wait until it is in master, so there's no stable commit to point 
you to yet. The details of messages etc are being tweaked.

> 
>> 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?

> 
>> You might want
>> to discuss some of this stuff on the kde mailing list because apparently
>> those paths and variables are quite a mess.
> 
> I'm more interested in corectness from cmake point of view than from kde
> point of view.

I hope that answers some of your questions.

Thanks,

Steve.




More information about the cmake-developers mailing list