KDE/kdevelop [POSSIBLY UNSAFE]
Matt Rogers
mattr at kde.org
Fri Apr 27 03:35:25 UTC 2007
On Apr 25, 2007, at 10:29 AM, Andreas Pakulat wrote:
> On 25.04.07 16:01:56, David Nolden wrote:
>> On Wednesday 25 April 2007 11:41:44 Andreas Pakulat wrote:
>>> I already commented there, we need to find out how to fix that,
>>> because
>>> the headers might not always be in /usr/include.
>>>
>>> Andreas
>>
>> Yep we'll have to look at it. Btw. why did you not use pkgconfig
>> for finding
>> the libraries and include-files? I used that in a simpler way
>> before to get
>> the include-path, and it worked.
>
> i didn't. That was Laurent Montell. One problem with pkg-config is
> that
> its not available under windows.
>
Really? IIRC, I had pkg-config compiled on windows at some point, or
so I thought...
>> The code was:
>> include(UsePkgConfig)
>> pkgconfig(libccgnu2 ccgnu2_includes ccgnu2_linkdir ccgnu2_linkflags
>> ccgnu2_cflags)
>>
>> I don't know those FIND_PATH and FIND_PACKAGE cmake-functions, so
>> I don't know
>> how conveniently they work for the task.
>
> Thats the "normal" way a CMake macro to find a library is written. How
> the macro finds includes, linkflags and libraries as well as defines
> doesn't matter, the important thing is that the XXX_LIBRARY_DIRS,
> XXX_INCLUDE_DIRS, XXX_LIBRARIES, XXX_DEFINES and XXX_FOUND are defined
> variables after executing the macro. The reason is simply that this is
> somewhat standard for CMake macros.
>
> FIND_PACKAGE(Foo) just executes the code in FindFoo.cmake in CMake's
> Module dir. And you can add REQUIRE then if the lib is not found cmake
> stops at that point.
>
> Andreas
>
Matt
More information about the KDevelop-devel
mailing list