svn commit: r1919954 - /subversion/branches/cmake/CMakeLists.txt

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: rinrab
Date: Sat Aug 17 14:42:22 2024
New Revision: 1919954

URL: http://svn.apache.org/viewvc?rev=1919954&view=rev
Log:
On the 'cmake' branch: Copy some files required for Python SWIG bindings.

* CMakeLists.txt
  (python swig): Copy the subversion/bindings/swig/python/svn directory to
   OUT/PythonPackages/svn and empty __init__.py to OUT/PythonPackages/libsvn.
   Use `cmake.exe -E copy' or `cmake.exe -E copy_directory' commands, added
   to libsvn_swig_py target as post build for that.

Modified:
    subversion/branches/cmake/CMakeLists.txt

Modified: subversion/branches/cmake/CMakeLists.txt
URL: http://svn.apache.org/viewvc/subversion/branches/cmake/CMakeLists.txt?rev=1919954&r1=1919953&r2=1919954&view=diff
==============================================================================
--- subversion/branches/cmake/CMakeLists.txt (original)
+++ subversion/branches/cmake/CMakeLists.txt Sat Aug 17 14:42:22 2024
@@ -560,6 +560,20 @@ if(SVN_USE_WIN32_CRASHHANDLER)
   )
 endif()
 
+if(SVN_ENABLE_SWIG_PYTHON)
+  add_custom_command(TARGET libsvn_swig_py POST_BUILD
+    COMMAND ${CMAKE_COMMAND} -E copy_directory
+      "${CMAKE_CURRENT_SOURCE_DIR}/subversion/bindings/swig/python/svn"
+      "$<TARGET_FILE_DIR:libsvn_swig_py>/PythonPackages/svn"
+  )
+
+  add_custom_command(TARGET libsvn_swig_py POST_BUILD
+    COMMAND ${CMAKE_COMMAND} -E copy
+      "${CMAKE_CURRENT_SOURCE_DIR}/subversion/bindings/swig/python/__init__.py"
+      "$<TARGET_FILE_DIR:libsvn_swig_py>/PythonPackages/libsvn"
+  )
+endif()
+
 string(TOLOWER "${CMAKE_HOST_SYSTEM_PROCESSOR}-${CMAKE_HOST_SYSTEM_NAME}" SVN_BUILD_HOST)
 string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}" SVN_BUILD_TARGET)
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.