[PATCH] FindExiv2.cmake

Andreas Pakulat apaku at gmx.de
Sun Dec 13 09:11:38 CET 2009


On 12.12.09 15:01:13, Allen Winter wrote:
> On Saturday 12 December 2009 1:53:08 pm Andreas Pakulat wrote:
> > On 12.12.09 10:22:55, Allen Winter wrote:
> > > Howdy,
> > > 
> > > Attached is a patch for FindExiv2.cmake.
> > > 
> > > I have libexiv 0.12 installed in /usr and libexiv 0.18 installed in /usr/local.
> > > I need the buildsystem to find the version in /usr/local.
> > > 
> > > I properly have my PKG_CONFIG_PATH set so /usr/local/lib/pkgconfig is searched first.
> > > 
> > > The current FindExiv2.cmake correctly locates 0.18 in /usr/local, but then
> > > incorrectly sets the ${EXIV2_LIBRARIES} to the version in /usr/lib.
> > > 
> > > My patch fixes that.  Please review.
> > > 
> > > -Allen
> > 
> > > Index: FindExiv2.cmake
> > > ===================================================================
> > > --- FindExiv2.cmake	(revision 1061633)
> > > +++ FindExiv2.cmake	(working copy)
> > > @@ -62,8 +62,9 @@ else (EXIV2_INCLUDE_DIR AND EXIV2_LIBRAR
> > >       )
> > >    
> > >       find_library(EXIV2_LIBRARIES NAMES exiv2 libexiv2
> > > -       PATHS
> > > +       HINTS
> > >         ${_EXIV2LinkDir}
> > > +       NO_DEFAULT_PATH
> > 
> > This second line is not needed if _EXIV2LinkDir is properly set from
> > pkg-config (provided the first is HINTS and not PATHS). Other than that the
> > patch is ok.
> 
> Ok, so just change PATHS to HINTS and that's it?

Right, that prefers the value of _EXIV2LinkDir over anything else,
including the default paths (/usr/lib, /usr/local/lib and the libdirs in
CMAKE_PREFIX_PATH).

Andreas

-- 
The time is right to make new friends.


More information about the Kde-buildsystem mailing list