FindQCA2.cmake changes

Michel Hermier michel.hermier at gmail.com
Thu Nov 30 12:18:47 GMT 2006


Alexander Neundorf wrote:
> Hi,
>
> On Thursday 30 November 2006 00:55, you wrote:
> ...
>   
>> 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 ?
>>     
>
> cmake always searches first in the default dirs and after that in the 
> additional directories given. To change that order you have to call it first 
> with NO_DEFAULT_PATH and then a second time with no extra paths and without 
> NO_DEFAULT_PATH. 
>
>   
I find this to be wrong. Usually when you give the macro the argument, 
you know what you are expecting. So default arguments should come later.

I was thinking earlier, isn't it possible to make a general macro to 
handle this ?
Usually the steps to check for a library are always the same.
- Check for package config on non win32.
- Search for the includes
- Search the binary
Quite always the same steps.
>> 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 ?
>>     
>
> Yes, since 2.4.something cmake automatically searches there, so they can be 
> removed now.
>
>   
I'll try to remove the one I found then.

Cheers,
   Michel.




More information about the kde-core-devel mailing list