On Wed, May 28, 2025 at 2:14 PM Branko Čibej <br...@apache.org> wrote:

> So I was fiddling with Serf's CMake build recently, and just now I noticed
> (again) that Serf has FindAPR.cmake and FindAPRUtil.cmake as well, and
> they're almost entirely completely different from Subversion's. Not only
> completely different but far more complete, IMO.
>
> I'd like to merge the two versions of these files and use the same ones in
> both Serf and Subversion. Maybe later submit them to APR, so that they can
> be deployed into <prefix>/share/cmake.
>
> -- Brane
>

+1

Actually, I was also thinking about merging those modules when I was
developing cmake support in svn.

The serf modules have a lot of custom code and I'd say they are a mess.
This is why I didn't copy them to subversion, but wrote them from scratch.
I remember when I was building serf using cmake, it failed a few times
because apr could not be located, which wasn't happening in svn.

I tried to avoid using custom hacks as much as possible, and I think they
are quite pretty right now. Except, they don't support pkgconfig library
finding. But this can be done through a standard module. Maybe I even have
a patch for that somewhere.

Also svn's modules define *imported targets *for apr which makes it so the
library can be linked in using a single line of cmake, including include
directories, lib files, and custom settings such as APR_DECLARE_STATIC.

So, it would be great if serf starts using svn's modules. I can try to
support pkgconfig in them if needed.

Thoughts?

-- 
Timofei Zhakov

Reply via email to