On Tue, Jun 10, 2025 at 6:42 PM Branko Čibej <br...@apache.org> wrote:
> On 10. 6. 25 17:46, rin...@apache.org wrote: > > Author: rinrab > Date: Tue Jun 10 15:46:58 2025 > New Revision: 1926344 > > URL: http://svn.apache.org/viewvc?rev=1926344&view=rev > Log: > cmake: Support pkg-config library search. > > - We are relying on the FindPkgConfig module which does all work of invoking > pkg-config and creating cmake on its own. > > - See: https://cmake.org/cmake/help/latest/module/FindPkgConfig.html > > - pkg-config is used only if SVN_USE_PKG_CONFIG is ON. By default, this option > is set to ON if pkg-config executable is available on the current machine, > or OFF we not. > > * CMakeLists.txt > (options): Look for pkg-config and define an option to tell cmake to use > pkg-config dependent on its existence. > (deps): Ensure pkg-config (and display version). > (APR, APR-Util, ZLIB, EXPAT, LZ4, UTF8PROC, SQlite3, Serf, GNOME Keyring): > look for the libraries through pkg_check_modules() if SVN_USE_PKG_CONFIG > is ON. Otherwise preserve old behavior. > (summary): Log SVN_USE_PKG_CONFIG into `Build Type` section. > > TODO: > > - Httpd doesn't provide pkg-config modules. > - KF5Wallet provides only a `kf5-config` executable (like apr-1-config), which > cannot be easily handled by existing modules. > > > And yet we're happily calling apr-*-config and krb5-config in the Serf > cmake build, and also kf5-config in Subversion's autotools build. What then > "cannot be easily handled"? If you mean you don't want to bother with that, > that's fine, just say so. > > In this commit I implemented only those libraries which provide standard .pc files, which are compatible with the FindPkgConfig module. kf5 isn't one of them. Also it's not that important since there are *cmake *config modules for this library. And let's try to avoid overcomplicating cmake with *-config invocation. - serf-2 (through pkg-config) cannot be easily implemented right now. > > > How is serf-2 different from serf-1 in that respect? It creates > essentially the same pkg-config file. So what then, when we release > serf-1.4 (or 1.5), using pkg-config to find it will suddenly become too > hard? How will cmake even know? > There is no difference except for names. I wasn't sure how I was going to call pkg-config twice. > > -- Brane > > -- Timofei Zhakov