Den ons 11 juni 2025 kl 17:12 skrev Branko Čibej <br...@apache.org>:
> On 11. 6. 25 00:07, rin...@apache.org wrote: > > Author: rinrab > Date: Tue Jun 10 22:07:50 2025 > New Revision: 1926350 > > URL: http://svn.apache.org/viewvc?rev=1926350&view=rev > Log: > cmake: Prevent re-definition of APR and Serf targets by using different > prefixes for version '1' and '2'. > > * CMakeLists.txt > (APR, Serf): Bunch of cmake magic. > > Modified: > subversion/trunk/CMakeLists.txt > > > > After the pkg-config related changes, cmake will no longer find a Serf on > macOS. This worked before, but now Serf_ROOT is ignored if we happen to > find pkg-config. That's because you use either find_package or > pkg_find_package, but never both. I have to explicitly disable > SVN_USE_PKG_CONFIG in order to build again. Looks like a regression to me. > > -- Brane > If I understand the issue here, pkg-config support was added in r1926344 <https://svn.apache.org/r1926344>. The commit message doesn't explicitly say so, but I suspect it was done because of Thomas Orgis' rant about CMake[1]. There was some discussion and additional commits adding support for serf and apr later on. Is the issue here that macOS has pkg-config, but the version of Serf that is available (I'm assuming Homebrew or macPorts) doesn't have pkg-config support? If my understanding of the situation is correct, would something like this (pseudocode/pseudopatch) help? [[[ ### Serf if (SVN_ENABLE_RA_SERF) if(SVN_USE_PKG_CONFIG) pkg_check_modules(serf1 IMPORTED_TARGET serf-1) if(serf1_FOUND) # serf-1 add_library(external-serf ALIAS PkgConfig::serf1) else() # serf-2 pkg_check_modules(serf2 IMPORTED_TARGET serf-2) + if(serf2_FOUND) add_library(external-serf ALIAS PkgConfig::serf2) + else() + find_package(Serf REQUIRED) + add_library(external-serf ALIAS Serf::Serf) + endif() endif() else() find_package(Serf REQUIRED) add_library(external-serf ALIAS Serf::Serf) endif() endif() ]]] Unfortunately I don't have a Mac to test... Cheers, Daniel [1] https://lists.apache.org/thread/m5jblt9pqhnkqozs86fnjm4wzfr9nblf