[cmake-developers] find_package without REQUIRED can cause fatal error now

Alexander Neundorf neundorf at kde.org
Wed Apr 24 16:24:42 EDT 2013


On Wednesday 24 April 2013, Brad King wrote:
> On 04/24/2013 09:29 AM, DeveloperChris wrote:
> > I had added some message lines to try and work out how it functions
> > part of the log snippet I actually cut out was the following...
> > 
> > ||-- Found automoc4: R:/bin/automoc4.exe||
> > ||-- the import prefix derived from
> > ||/lib/cmake/KActivities/KActivitiesLibraryTargets.cmake is :-
> > ||/lib/cmake/KActivities|| -- the import prefix derived from /lib/cmake
> > ||is :- /lib/cmake|| -- the import prefix derived from /lib is :- /lib||
> > ||-- the import prefix derived from / is :- /||
> > ||-- the import prefix is :- /||
> > ||CMake Error at
> > ||/lib/cmake/KActivities/KActivitiesLibraryTargets.cmake:68 (message):||
> > 
> > So the import prefix is set to /
> 
> The above all happens inside files loaded by find_package.  The
> problem is that they are being loaded through a path starting
> in "/" and using that to compute the import prefix relative to
> themselves.  This process is a victim of the real problem, not
> the cause.
> 
> We need to figure out what tells find_package to look for and
> load KActivitiesConfig.cmake from a path with no drive letter
> in the first place.

Is it this one http://public.kitware.com/Bug/view.php?id=10994 ?

Alex



More information about the cmake-developers mailing list