svn commit: r1919948 - /subversion/branches/cmake/build/generator/templates/targets.cmake.ezt

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: rinrab
Date: Sat Aug 17 13:52:16 2024
New Revision: 1919948

URL: http://svn.apache.org/viewvc?rev=1919948&view=rev
Log:
On the 'cmake' branch: Setup output directory of SWIG artifacts (such as
generated *.py files in case of Python).

We will generate the python module wrappers into the OUT/PythonPackages/libsvn
directory, similarly to INSTALL documentation of SWIG bindings.

* build/generator/templates/targets.cmake.ezt
  (swig): Setup OUTPUT_DIR when creating a SWIG target for all languages or
   make them TODO; add a TODO comment about using generator expressions.

See also a thread about r1919757 on dev where it was discussed. It is
archived at [1].

[1] https://lists.apache.org/thread/kbnl288bp027zsg6l7y8hfq7fdp6fm37

Modified:
    subversion/branches/cmake/build/generator/templates/targets.cmake.ezt

Modified: subversion/branches/cmake/build/generator/templates/targets.cmake.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/cmake/build/generator/templates/targets.cmake.ezt?rev=1919948&r1=1919947&r2=1919948&view=diff
==============================================================================
--- subversion/branches/cmake/build/generator/templates/targets.cmake.ezt (original)
+++ subversion/branches/cmake/build/generator/templates/targets.cmake.ezt Sat Aug 17 13:52:16 2024
@@ -22,9 +22,13 @@
 [for targets]
 # [if-any targets.description][targets.description][else][targets.name][end]
 if ([targets.enable_condition])[is targets.type "swig"]
+  # TODO: Use generator expressions instead of CMAKE_CURRENT_BINARY_DIR?
   swig_add_library([targets.name]
     LANGUAGE [targets.swig_lang]
-    SOURCES[for targets.sources] [targets.sources][end]
+    SOURCES[for targets.sources] [targets.sources][end][is targets.swig_lang "python"]
+    OUTPUT_DIR "{CMAKE_CURRENT_BINARY_DIR}/PythonPackages/libsvn"[end][is targets.swig_lang "perl"]
+    OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/PerlLibs/TODO"[end][is targets.swig_lang "ruby"]
+    OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/site_ruby/TODO"[end]
   )
   set_target_properties([targets.name] PROPERTIES
     SWIG_INCLUDE_DIRECTORIES "${SWIG_INCLUDE_DIRECTORIES}"
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.