FindQCA2.cmake changes

Alexander Neundorf neundorf at kde.org
Wed Nov 29 23:06:17 GMT 2006


Hi Michel, 

On Wednesday 29 November 2006 12:44, Michel Hermier wrote:
> Michel Hermier wrote:
> > Hi,
> > Here are my changes to make FindQCA2.cmake working for me (the path
> > were broken for me).
> > I changed it so it follows what other find scripts do:
> > - using the cache (don't know if it's rigth to do so)
> > - Check the presence of the libraries for dynamic compilation instead
> > of relying on pkg-config only (maybe this also fix things on WIN32, I
> > don't really know)
> >
> > Comments or OK to commit ?
>
> 2 days without comment or objections. Commiting as this (#609041).
> Report QCA2 search breakage to me so that I can take proper actions.

It was on my todo, I didn't ignore it.

This one isn't perfect:

FIND_LIBRARY(QCA2_LIBRARIES NAMES qca
    PATHS
    ${_Qca2LinkDir} 
    NO_DEFAULT_PATH 
  )

Under Windows _Qca2LinkDir will be empty, and with default paths excluded, so 
it won't be found.
You could do:

FIND_LIBRARY(QCA2_LIBRARIES NAMES qca
    PATHS
    ${_Qca2LinkDir} 
    NO_DEFAULT_PATH 
  )

IF (NOT QCA2_LIBRARIES)
   FIND_LIBRARY(QCA2_LIBRARIES NAMES qca )
ENDIF (NOT QCA2_LIBRARIES)

I think it should also work without the IF(), since FIND_LIBRARY() will do 
nothing if the variable already contains a valid location, it will only do 
something if the first FIND_LIBRARY() call failed.

Why do you use NO_DEFAULT_PATH for FIND_LIBRARY() but not for FIND_PATH() ?

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net




More information about the kde-core-devel mailing list