svn commit: r1926351 - in /subversion/trunk: CMakeLists.txt build/cmake/FindSerf.cmake

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: rinrab
Date: Tue Jun 10 22:28:48 2025
New Revision: 1926351

URL: http://svn.apache.org/viewvc?rev=1926351&view=rev
Log:
cmake: Use `VERSION_LESS` condition to check whether we should require
APR-Util or not.

* build/cmake/FindSerf.cmake, CMakeLists.txt: Ditto.

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

Modified: subversion/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/subversion/trunk/CMakeLists.txt?rev=1926351&r1=1926350&r2=1926351&view=diff
==============================================================================
--- subversion/trunk/CMakeLists.txt (original)
+++ subversion/trunk/CMakeLists.txt Tue Jun 10 22:28:48 2025
@@ -281,11 +281,11 @@ else()
   find_package(APR REQUIRED)
   add_library(external-apr ALIAS apr::apr)
 
-  if(APR_MAJOR_VERSION EQUAL 2)
-    add_library(external-aprutil ALIAS apr::apr)
-  else()
+  if(APR_VERSION VERSION_LESS 2.0.0)
     find_package(APRUtil REQUIRED)
     add_library(external-aprutil ALIAS apr::aprutil)
+  else()
+    add_library(external-aprutil ALIAS apr::apr)
   endif()
 endif()
 

Modified: subversion/trunk/build/cmake/FindSerf.cmake
URL: http://svn.apache.org/viewvc/subversion/trunk/build/cmake/FindSerf.cmake?rev=1926351&r1=1926350&r2=1926351&view=diff
==============================================================================
--- subversion/trunk/build/cmake/FindSerf.cmake (original)
+++ subversion/trunk/build/cmake/FindSerf.cmake Tue Jun 10 22:28:48 2025
@@ -85,7 +85,7 @@ target_link_libraries(Serf::Serf INTERFA
   ZLIB::ZLIB
 )
 
-if(NOT APR_MAJOR_VERSION EQUAL 2)
+if(APR_VERSION VERSION_LESS 2.0.0)
   find_package(APRUtil REQUIRED)
   target_link_libraries(Serf::Serf INTERFACE apr::aprutil)
 endif()
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.