svn commit: r1926346 - /subversion/trunk/CMakeLists.txt

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: rinrab
Date: Tue Jun 10 18:08:36 2025
New Revision: 1926346

URL: http://svn.apache.org/viewvc?rev=1926346&view=rev
Log:
cmake: Support serf-2 from pkg-config.

* CMakeLists.txt: check for serf-1 first (without REQUIRE), and then, if
  it wasn't found, finally try serf-2.

Modified:
    subversion/trunk/CMakeLists.txt

Modified: subversion/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/subversion/trunk/CMakeLists.txt?rev=1926346&r1=1926345&r2=1926346&view=diff
==============================================================================
--- subversion/trunk/CMakeLists.txt (original)
+++ subversion/trunk/CMakeLists.txt Tue Jun 10 18:08:36 2025
@@ -365,10 +365,15 @@ endif()
 
 ### Serf
 if (SVN_ENABLE_RA_SERF)
-  # TODO: serf-2
   if(SVN_USE_PKG_CONFIG)
-    pkg_check_modules(serf-1 REQUIRED IMPORTED_TARGET serf-1)
-    add_library(external-serf ALIAS PkgConfig::serf-1)
+    pkg_check_modules(serf IMPORTED_TARGET serf-1)
+
+    # Try serf-2 instead?
+    if(NOT serf_FOUND)
+      pkg_check_modules(serf REQUIRED IMPORTED_TARGET serf-2)
+    endif()
+
+    add_library(external-serf ALIAS PkgConfig::serf)
   else()
     find_package(Serf REQUIRED)
     add_library(external-serf ALIAS Serf::Serf)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.