summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-10-28 17:10:48 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-10-31 12:06:26 -0300
commit460daee7a8e9f0e0f5c3cdfe404282f01de47d1c (patch)
tree29721faea127f42e2fddbfa4186be501771ea943
parent36c14a2a0599d27c56c23bd6667e952e8738ca3f (diff)
mono: introduce friend assemblydevs/zmike/123citest
Summary: Friend assemblies can access efl_mono assembly's internal types and members. If `build-tests` option is true, `efl-mono-suite.exe` and `efl_mono_test.dll` will become friend assemblies. Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho Reviewed By: lauromoura Subscribers: felipealmeida, cedric, #reviewers, woohyun, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10337
-rw-r--r--meson_options.txt6
-rw-r--r--src/bindings/mono/efl_mono/AssemblyInfo.cs.in3
-rw-r--r--src/bindings/mono/efl_mono/meson.build19
3 files changed, 28 insertions, 0 deletions
diff --git a/meson_options.txt b/meson_options.txt
index 33e74de..aaa8c89 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -373,3 +373,9 @@ option('install-eo-files',
373 value: false, 373 value: false,
374 description : 'Install any eo file' 374 description : 'Install any eo file'
375) 375)
376
377option('mono-friend-assemblies',
378 type : 'array',
379 value : [],
380 description : 'List of friend assemblies that can access efl_mono assembly\'s internal types and members.'
381)
diff --git a/src/bindings/mono/efl_mono/AssemblyInfo.cs.in b/src/bindings/mono/efl_mono/AssemblyInfo.cs.in
new file mode 100644
index 0000000..e22d0a4
--- /dev/null
+++ b/src/bindings/mono/efl_mono/AssemblyInfo.cs.in
@@ -0,0 +1,3 @@
1using System.Runtime.CompilerServices;
2
3@MONO_FRIEND_ASSEMBLIES@
diff --git a/src/bindings/mono/efl_mono/meson.build b/src/bindings/mono/efl_mono/meson.build
index cfe53ee..6542f51 100644
--- a/src/bindings/mono/efl_mono/meson.build
+++ b/src/bindings/mono/efl_mono/meson.build
@@ -34,6 +34,25 @@ efl_src = configure_file(
34 configuration: efl_libs 34 configuration: efl_libs
35) 35)
36 36
37friend_assemblies = ''
38mono_friend_assemblies = get_option('mono-friend-assemblies')
39if get_option('build-tests')
40 mono_friend_assemblies += 'efl-mono-suite'
41 mono_friend_assemblies += 'efl_mono_test'
42endif
43
44foreach f : mono_friend_assemblies
45 friend_assemblies += '[assembly: InternalsVisibleTo("@0@")]\n'.format(f)
46endforeach
47friend_assembly_data = configuration_data()
48friend_assembly_data.set('MONO_FRIEND_ASSEMBLIES', friend_assemblies)
49
50mono_files += configure_file(
51 input: 'AssemblyInfo.cs.in',
52 output: 'AssemblyInfo.cs',
53 configuration: friend_assembly_data
54)
55
37mono_eo_files = [ 56mono_eo_files = [
38 'efl_mono_model_internal.eo', 57 'efl_mono_model_internal.eo',
39 'efl_mono_model_internal_child.eo' 58 'efl_mono_model_internal_child.eo'