Author: jun66j5
Date: Wed Jul 22 21:34:29 2026
New Revision: 1936503

Log:
cmake: Fix `find_package(Python3)` failing with versions of cmake prior to
3.18.

* CMakeLists.txt
  (swig-python):
    Use `Development` instead of `Development.Module` in `COMPONENTS` of
    `find_package(Python3)` for versions of cmake prior to 3.18.

Modified:
   subversion/trunk/CMakeLists.txt

Modified: subversion/trunk/CMakeLists.txt
==============================================================================
--- subversion/trunk/CMakeLists.txt     Wed Jul 22 20:10:03 2026        
(r1936502)
+++ subversion/trunk/CMakeLists.txt     Wed Jul 22 21:34:29 2026        
(r1936503)
@@ -707,10 +707,11 @@ endif()
 ### Python
 
 if(SVN_ENABLE_SWIG_PYTHON)
-  find_package(Python3 REQUIRED COMPONENTS
-      Interpreter
-      Development.Module
-  )
+  if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.18")
+    find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
+  else()
+    find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
+  endif()
 elseif(SVN_ENABLE_TESTS)
   find_package(Python3 REQUIRED COMPONENTS
       Interpreter

Reply via email to