svn commit: r1926871 - in /subversion/trunk: CMakeLists.txt build/cmake/FindAPR.cmake

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: dsahlberg
Date: Mon Jun 30 11:34:43 2025
New Revision: 1926871

URL: http://svn.apache.org/viewvc?rev=1926871&view=rev
Log:
In the CMake build system: Consistently search for the newer version of APR
and Serf, matching the behaviour of the autoconf build system.

* CMakeLists.txt
  (apr, serf): Search for apr-2/serf-2 before apr-1/serf-1 when using
    pkg_search_module.
* build/cmake/FindAPR.cmake: Search for apr-2 before apr-1

Suggested by: brane
Review by: rinrab

See dev@: https://lists.apache.org/thread/t9olkpvbbjrykfknlw7h2tsvtjd8hwy1


Modified:
    subversion/trunk/CMakeLists.txt
    subversion/trunk/build/cmake/FindAPR.cmake

Modified: subversion/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/subversion/trunk/CMakeLists.txt?rev=1926871&r1=1926870&r2=1926871&view=diff
==============================================================================
--- subversion/trunk/CMakeLists.txt (original)
+++ subversion/trunk/CMakeLists.txt Mon Jun 30 11:34:43 2025
@@ -263,7 +263,7 @@ endif()
 ### APR and APR-Util
 
 if(SVN_USE_PKG_CONFIG)
-  pkg_search_module(apr REQUIRED IMPORTED_TARGET apr-1 apr-2)
+  pkg_search_module(apr REQUIRED IMPORTED_TARGET apr-2 apr-1)
   add_library(external-apr ALIAS PkgConfig::apr)
 
   if(APR_VERSION VERSION_LESS 2.0.0)
@@ -372,7 +372,7 @@ endif()
 ### Serf
 if (SVN_ENABLE_RA_SERF)
   if(SVN_USE_PKG_CONFIG)
-    pkg_search_module(serf IMPORTED_TARGET serf-1 serf-2)
+    pkg_search_module(serf IMPORTED_TARGET serf-2 serf-1)
 
     if(serf_FOUND)
       add_library(external-serf ALIAS PkgConfig::serf)

Modified: subversion/trunk/build/cmake/FindAPR.cmake
URL: http://svn.apache.org/viewvc/subversion/trunk/build/cmake/FindAPR.cmake?rev=1926871&r1=1926870&r2=1926871&view=diff
==============================================================================
--- subversion/trunk/build/cmake/FindAPR.cmake (original)
+++ subversion/trunk/build/cmake/FindAPR.cmake Mon Jun 30 11:34:43 2025
@@ -23,10 +23,10 @@ find_path(APR_INCLUDE_DIR
   NAMES apr.h
   PATH_SUFFIXES
     include
-    include/apr-1
-    include/apr-1.0
     include/apr-2
     include/apr-2.0
+    include/apr-1
+    include/apr-1.0
 )
 
 if (APR_INCLUDE_DIR AND EXISTS ${APR_INCLUDE_DIR}/apr_version.h)
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.