Finding APR

Matthew Woehlke mw_triad at users.sourceforge.net
Tue May 8 23:02:59 UTC 2007


Andreas Pakulat wrote:
> On 08.05.07 16:58:33, Matthew Woehlke wrote:
>> [snip]
>> I'm guessing kdesdk and kdevelop really should be sharing their FindSVN.cmake.
> 
> Actually I think it should be put into CMake itself. Currently CMake
> only has a macro for finding the svn binary (whatever that could be used
> for in a build script).

That's fine also, but does that work for KDE without bumping the CMake 
version requirement?

>>> So I'm going to use the stanard way of FIND_LIBRARY and FIND_PATH for
>>> libs and includes.
>> Um... does that mean that I have to jump through hoops to use svn if apr 
>> is in a non-standard location, even if apr-config is in PATH? That would 
>> be unfortunate.
> 
> If you call supplying the path to the two variables CMAKE_INCLUDE_PATH
> and CMAKE_LIBRARY_PATH hoops then yes ;)
> 
> Well, I could probably use apr-config for the include path, but for the
> library path....
> 
> I'm not that good at cmake yet, but I guess parsing the --link-ld output
> could be done this way:
> 
> split on dash and with the list do:
> find item which starts with L and remove the L - use that as path
> find item which starts with l and remove the l, add lib and .so and
> append the result to the path (with a path separator)

Did you look at the revision I pointed you at yet? That's exactly what I 
did in kdesdk :-). (Actually you want to use FIND_LIBRARY to "add lib 
and .so", but close enough.)

This would work great if we could do real word splitting on the output 
of --link-ld... Right now I just split on spaces, which will break if 
there are quoted spaces in the output of --link-ld. (I was told on the 
CMake list that "there is no way to do this correctly using regular 
expressions", which to be honest I'm not convinced of, but it's less 
pretty than SEPARATE_ARGS would be if it actually worked.)

-- 
Matthew
"Please remain calm... I may be mad, but I am a professional."
   -- Mad Scientist





More information about the KDevelop-devel mailing list