Finding APR

Andreas Pakulat apaku at gmx.de
Tue May 8 22:40:13 UTC 2007


On 08.05.07 16:58:33, Matthew Woehlke wrote:
> Andreas Pakulat wrote:
> > I had a look at the two links and my conclusion is that I will change
> > KDevelops script to find Subversion and APR/APU without relying on any
> > -config program. Subversion removed its svn-config already and the apr
> > ones don't produce output that is currently easily parseable.
> 
> Not given the state of SEPARATE_ARGS anyway. I'd like to see what you 
> come up with, since I have seem to have a weird installation. 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).

> > 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)

If you have an idea how to do that, I'm all ears, actually for finding
the first part is enough, i.e. finding the path to use it as default for
finding libapr-1.so

Andreas

-- 
All the troubles you have will pass away very quickly.




More information about the KDevelop-devel mailing list