forked from enlightenment/efl
mono: introduce friend assembly
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
This commit is contained in:
parent
e25ed4f353
commit
e6fafe4e61
|
@ -366,3 +366,9 @@ option('install-eo-files',
|
|||
value: false,
|
||||
description : 'Install any eo file'
|
||||
)
|
||||
|
||||
option('mono-friend-assemblies',
|
||||
type : 'array',
|
||||
value : [],
|
||||
description : 'List of friend assemblies that can access efl_mono assembly\'s internal types and members.'
|
||||
)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
|
||||
@MONO_FRIEND_ASSEMBLIES@
|
|
@ -34,6 +34,25 @@ efl_src = configure_file(
|
|||
configuration: efl_libs
|
||||
)
|
||||
|
||||
friend_assemblies = ''
|
||||
mono_friend_assemblies = get_option('mono-friend-assemblies')
|
||||
if get_option('build-tests')
|
||||
mono_friend_assemblies += 'efl-mono-suite'
|
||||
mono_friend_assemblies += 'efl_mono_test'
|
||||
endif
|
||||
|
||||
foreach f : mono_friend_assemblies
|
||||
friend_assemblies += '[assembly: InternalsVisibleTo("@0@")]\n'.format(f)
|
||||
endforeach
|
||||
friend_assembly_data = configuration_data()
|
||||
friend_assembly_data.set('MONO_FRIEND_ASSEMBLIES', friend_assemblies)
|
||||
|
||||
mono_files += configure_file(
|
||||
input: 'AssemblyInfo.cs.in',
|
||||
output: 'AssemblyInfo.cs',
|
||||
configuration: friend_assembly_data
|
||||
)
|
||||
|
||||
mono_eo_files = [
|
||||
'efl_mono_model_internal.eo',
|
||||
'efl_mono_model_internal_child.eo'
|
||||
|
|
Loading…
Reference in New Issue