summaryrefslogtreecommitdiff
path: root/src/bindings/mono/meson.build
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-10-17 13:04:07 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-10-24 12:05:58 +0200
commit6f9761ff54cf1c6e3d90407beefeee50118d6a9c (patch)
treef991b0659b22a68cf7e5ee3fd3010e631a359fae /src/bindings/mono/meson.build
parente85311c99286988f98ce081148f6f9e298086c2d (diff)
meson: time for the c-sharp build
The tests are added and build. For running C# code please see the wiki. you can enable -Dmono=true Differential Revision: https://phab.enlightenment.org/D7203
Diffstat (limited to 'src/bindings/mono/meson.build')
-rw-r--r--src/bindings/mono/meson.build130
1 files changed, 130 insertions, 0 deletions
diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build
new file mode 100644
index 0000000..dc948a6
--- /dev/null
+++ b/src/bindings/mono/meson.build
@@ -0,0 +1,130 @@
1mono_sublibs = [
2 ['Eina', true, ], #
3 ['Eolian', true, ], #
4 ['Eo', true, ], #
5 ['Ecore', false, ], #
6 ['Efl', true, ], #
7 ['Evas', false, ], #
8 ['Edje', false, ], #
9 ['Eldbus', true, ], #
10 ['Ecore_Evas', true, ], #
11 ['Elementary', false, ] #
12]
13
14blacklisted_files = [
15 'efl_canvas_text.eo',
16 'efl_canvas_scene3d.eo',
17 'evas_canvas3d_camera.eo',
18 'evas_canvas3d_light.eo',
19 'evas_canvas3d_material.eo',
20 'evas_canvas3d_mesh.eo',
21 'evas_canvas3d_node.eo',
22 'evas_canvas3d_object.eo',
23 'evas_canvas3d_primitive.eo',
24 'evas_canvas3d_scene.eo',
25 'evas_canvas3d_texture.eo',
26 'efl_canvas_vg_object.eo',
27 'efl_vg.eo',
28 'efl_vg_container.eo',
29 'efl_vg_gradient.eo',
30 'efl_vg_gradient_radial.eo',
31 'efl_vg_gradient_linear.eo',
32 'efl_vg_root_node.eo',
33 'efl_vg_shape.eo.cs',
34 'efl_io_buffer.eo',
35 'efl_io_positioner.eo',
36 'efl_io_queue.eo',
37 'efl_io_sizer.eo',
38 'efl_io_closer_fd.eo',
39 'efl_io_buffered_stream.eo',
40 'efl_io_positioner_fd.eo',
41 'efl_io_reader_fd.eo',
42 'efl_io_writer_fd.eo',
43 'efl_io_copier_fd.eo',
44 'efl_io_sizer_fd.eo',
45 'efl_io_stdin.eo',
46 'efl_io_stdout.eo',
47 'efl_io_stderr.eo',
48 'efl_io_file.eo',
49 'efl_io_copier.eo',
50 'efl_object_override.eo',
51 'elm_web.eo',
52 'elm_map.eo',
53 'elm_combobox.eo',
54 'elm_list.eo',
55 'elm_genlist.eo',
56 'elm_view_list.eo',
57 'elm_genlist_item.eo',
58 'elm_gengrid.eo',
59 'elm_glview.eo.cs'
60]
61
62efl_mono_lib = library('eflcustomexportsmono',
63 join_paths('..', '..', 'lib', 'efl_mono', 'efl_custom_exports_mono.c'),
64 install : true,
65 dependencies : [eo, eina]
66)
67
68mono_generator_target = []
69mono_files = []
70foreach lib : mono_sublibs
71 package_name = lib[0].to_lower()
72 eo_file_subdirs = get_variable(package_name + '_eo_subdirs')
73 file_location = join_paths('..', '..', 'lib', package_name)
74
75 if (package_name != 'eldbus')
76 foreach eo_file_subdir : eo_file_subdirs
77 if eo_file_subdir != ''
78 mono_pub_eo_files = get_variable(package_name + '_' + eo_file_subdir +'_eo_files') + get_variable(package_name + '_' + eo_file_subdir + '_eot_files')
79 else
80 mono_pub_eo_files = get_variable(package_name +'_eo_files') + get_variable(package_name + '_eot_files')
81 endif
82
83 subdir_file_location = join_paths(file_location, eo_file_subdir)
84 foreach mono_gen_file : mono_pub_eo_files
85 if not blacklisted_files.contains(mono_gen_file)
86 mono_generator_target += custom_target('eolian_mono_gen_'+mono_gen_file.underscorify()+'',
87 input : join_paths(subdir_file_location, mono_gen_file),
88 output : [mono_gen_file + '.cs'],
89 command : [eolian_mono_gen, '-I', meson.current_source_dir(), eolian_include_directories,
90 '--dllimport', package_name,
91 '-o', join_paths(meson.current_build_dir(), mono_gen_file + '.cs'),
92 '@INPUT@'])
93 endif
94 endforeach
95 endforeach
96 endif
97 if lib[1]
98 subdir(package_name + '_mono')
99 endif
100endforeach
101
102legacy_evas_required_by_mono = ['evas_box.eo', 'evas_image.eo', 'evas_table.eo', 'evas_text.eo']
103subdir_file_location = join_paths('..', '..', 'lib', 'evas', 'canvas')
104foreach mono_gen_file : legacy_evas_required_by_mono
105 mono_generator_target += custom_target('eolian_mono_gen_'+mono_gen_file.underscorify()+'',
106 input : join_paths(subdir_file_location, mono_gen_file),
107 output : [mono_gen_file + '.cs'],
108 command : [eolian_mono_gen, '-I', meson.current_source_dir(), eolian_include_directories,
109 '--dllimport', 'evas',
110 '-o', join_paths(meson.current_build_dir(), mono_gen_file + '.cs'),
111 '@INPUT@'])
112endforeach
113
114efl_mono = library('efl_mono',
115 mono_generator_target + mono_files + [efl_src],
116 install : true,
117 install_dir : join_paths(dir_lib, 'efl-mono-'+version_major)
118)
119
120efl_mono_test_suite_path=join_paths(meson.current_build_dir())
121
122pkgconfig.generate(
123 name : 'efl-mono',
124 description : 'Efl C# bindings',
125 version : version_major + '.' + version_minor,
126 libraries : ['-r:${assemblies_dir}/efl_mono.dll'],
127 variables : ['assemblies_dir='+join_paths(dir_lib, 'efl-mono-'+version_major),
128 'mono_libs=-r:${assemblies_dir}/efl_mono.dll']
129)
130test_dirs += 'efl_mono'