FindQCA2.cmake changes
Michel Hermier
michel.hermier at gmail.com
Wed Nov 29 23:55:57 GMT 2006
Alexander Neundorf wrote:
> 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
>
Hi,
This was done in the previous code, I only indented that part. and added
the FIND_PATH. In the other file I saw, the FIND_PATH was not using
NO_DEFAULT_PATH, so blindly copied it. Maybe we only simply have to
remove the NO_DEFAULT_PATH for FIND_LIBRARY ? it will try to search for
no path (due to empty string) on win32 and then search the standard dirs ?
Speaking about that I saw some native linux path in some of the
FIND_PATH calls (line /usr/include /usr/local_include), aren't they in
the default path so we can remove them ?
Michel
More information about the kde-core-devel
mailing list