xartigas pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9c99397cda5f3424a57bebcf03a12eaf4f6b6613

commit 9c99397cda5f3424a57bebcf03a12eaf4f6b6613
Author: Lauro Moura <lauromo...@expertisesolutions.com.br>
Date:   Fri Mar 15 10:35:10 2019 +0100

    meson: Enable generation of C# docs.
    
    Summary:
    In order to correctly install the xml file alongside the dll, a install
    script is used to work around meson's limitation of tracking files
    generated by library() other than the dll.
    
    Fixes T7722
    
    Reviewers: segfaultxavi, bu5hm4n
    
    Reviewed By: segfaultxavi, bu5hm4n
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Maniphest Tasks: T7722
    
    Differential Revision: https://phab.enlightenment.org/D8331
---
 meson/meson_csharp_docs.sh    |  7 +++++++
 src/bindings/mono/meson.build | 11 +++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/meson/meson_csharp_docs.sh b/meson/meson_csharp_docs.sh
new file mode 100755
index 0000000000..4e6577a173
--- /dev/null
+++ b/meson/meson_csharp_docs.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Installer script needed to install documentation xml file
+# as meson's library() call can't track files other than the generated
+# efl_mono.dll
+
+cp $1 $2
diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build
index 13fe4caada..3d844e7dac 100644
--- a/src/bindings/mono/meson.build
+++ b/src/bindings/mono/meson.build
@@ -156,13 +156,20 @@ if get_option('mono-beta')
   extra_cs_args += '-d:EFL_BETA'
 endif
 
+efl_mono_install_dir = join_paths(dir_lib, 'efl-mono-'+version_major)
+efl_mono_xml_doc = join_paths(meson.current_build_dir(), 'efl_mono.xml')
+
 efl_mono = library('efl_mono',
     mono_generator_target + mono_files + [efl_src],
     install : true,
-    install_dir : join_paths(dir_lib, 'efl-mono-'+version_major),
-    cs_args : extra_cs_args
+    install_dir : efl_mono_install_dir,
+    cs_args : extra_cs_args + ['-doc:' + efl_mono_xml_doc]
 )
 
+meson.add_install_script(join_paths(meson.source_root(), 'meson', 
'meson_csharp_docs.sh'),
+                         efl_mono_xml_doc,
+                         efl_mono_install_dir)
+
 efl_mono_test_suite_path=join_paths(meson.current_build_dir())
 
 pkgconfig.generate(

-- 


Reply via email to