Finding APR
Andreas Pakulat
apaku at gmx.de
Tue May 8 23:29:09 UTC 2007
On 08.05.07 18:02:59, Matthew Woehlke wrote:
> Andreas Pakulat wrote:
> > 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.)
Of course I did :) Well, splitting at "-" is just as bad as splitting at
" ", it may be inside a path as well.
Anyway I'm going to build apr tomorrow locally and put it into a path
with spaces, lets see what apr-config tells me afterwards (I'm guessing
it will give me -Lfoo bar or -Lfoo\ bar, but no quotes).
> 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
Well, you can if you ignore quotes of "", i.e. something like
"foo\"bar"
cannot be parsed by a regexp. And now that I said that I need to add a
todo-item for the qmake parser in Kdev4 which obviously can't parse
quoted " :(
Andreas
--
The whole world is a tuxedo and you are a pair of brown shoes.
-- George Gobel
More information about the KDevelop-devel
mailing list