summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-08-18 17:05:27 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-10-18 16:01:07 +0200
commit5aaf2cbb5defd64a2048fe90e80004d435bbca1a (patch)
tree40085c97f5b1493c00cb1898dbb0607f803bcaf9
parent16c4eba56553a49d30dcfd6073078694f6b81511 (diff)
meson: add cxx bindings
this commit adds cxx bindings to meson. Differential Revision: https://phab.enlightenment.org/D7169
-rw-r--r--meson.build36
-rw-r--r--meson_options.txt12
-rw-r--r--src/bin/eolian_cxx/meson.build6
-rw-r--r--src/bindings/cxx/ecore_cxx/meson.build4
-rw-r--r--src/bindings/cxx/eet_cxx/meson.build6
-rw-r--r--src/bindings/cxx/efl_cxx/meson.build2
-rw-r--r--src/bindings/cxx/eina_cxx/meson.build54
-rw-r--r--src/bindings/cxx/eldbus_cxx/meson.build14
-rw-r--r--src/bindings/cxx/eo_cxx/meson.build11
-rw-r--r--src/bindings/cxx/eolian_cxx/meson.build72
-rw-r--r--src/bindings/cxx/meson.build101
-rw-r--r--src/lib/efl/interfaces/meson.build10
-rw-r--r--src/lib/efl/meson.build6
-rw-r--r--src/lib/evas/canvas/meson.build2
-rw-r--r--src/lib/evas/gesture/meson.build2
-rw-r--r--src/lib/evas/meson.build2
-rw-r--r--src/lib/evas_goal/meson.build4
-rw-r--r--src/tests/ecore_cxx/meson.build29
-rw-r--r--src/tests/edje_cxx/meson.build9
-rw-r--r--src/tests/eet_cxx/meson.build21
-rw-r--r--src/tests/eina_cxx/meson.build57
-rw-r--r--src/tests/eldbus_cxx/meson.build21
-rw-r--r--src/tests/elementary_cxx/meson.build9
-rw-r--r--src/tests/eo_cxx/meson.build20
-rw-r--r--src/tests/eolian_cxx/meson.build78
-rw-r--r--src/tests/evas_cxx/meson.build9
26 files changed, 576 insertions, 21 deletions
diff --git a/meson.build b/meson.build
index 0a8870eea6..0c2e997573 100644
--- a/meson.build
+++ b/meson.build
@@ -58,6 +58,7 @@ dir_lib = join_paths(dir_prefix, get_option('libdir'))
58 58
59#local paths 59#local paths
60local_lib = join_paths('src', 'lib') 60local_lib = join_paths('src', 'lib')
61local_bindings = join_paths('src', 'bindings')
61local_bin = join_paths('src', 'bin') 62local_bin = join_paths('src', 'bin')
62local_module = join_paths('src', 'modules') 63local_module = join_paths('src', 'modules')
63local_tests = join_paths('src', 'tests') 64local_tests = join_paths('src', 'tests')
@@ -65,18 +66,15 @@ local_benchmark = join_paths('src', 'benchmarks')
65local_examples = join_paths('src', 'examples') 66local_examples = join_paths('src', 'examples')
66local_scripts = join_paths('src', 'scripts') 67local_scripts = join_paths('src', 'scripts')
67 68
68add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c') 69foreach lang : ['c', 'objc', 'cpp']
69add_global_arguments('-D_GNU_SOURCE=1', language: 'c') 70 add_global_arguments('-DHAVE_CONFIG_H=1', language: lang)
70add_global_arguments('-fPIC', language: 'c') 71 add_global_arguments('-D_GNU_SOURCE=1', language: lang)
71 72 add_global_arguments('-DEFL_EO_API_SUPPORT=1', language: lang)
72add_global_arguments('-DEFL_EO_API_SUPPORT=1', language: 'c') 73 add_global_arguments('-DEFL_BETA_API_SUPPORT=1', language: lang)
73add_global_arguments('-DEFL_BETA_API_SUPPORT=1', language: 'c') 74 add_global_arguments('-DNEED_RUN_IN_TREE=1', language: lang)
74add_global_arguments('-DNEED_RUN_IN_TREE=1', language: 'c') 75 add_global_arguments('-DEFL_BUILD=1', language: lang)
75add_global_arguments('-DEFL_BUILD=1', language: 'c') 76 add_global_arguments('-DELM_INTERNAL_API_ARGESFSDFEFC=1', language: lang)
76add_global_arguments('-DEFL_BUILD=1', language: 'objc') 77endforeach
77add_global_arguments('-DEFL_EO_API_SUPPORT=1', language: 'objc')
78add_global_arguments('-DEFL_BETA_API_SUPPORT=1', language: 'objc')
79add_global_arguments('-DELM_INTERNAL_API_ARGESFSDFEFC=1', language: 'c')
80 78
81config_h = configuration_data() 79config_h = configuration_data()
82config_h.set_quoted('MODULE_ARCH', version_name) 80config_h.set_quoted('MODULE_ARCH', version_name)
@@ -97,7 +95,6 @@ config_h.set_quoted('PACKAGE_SYSCONF_DIR', dir_sysconf)
97config_h.set_quoted('BINDIR', dir_bin) 95config_h.set_quoted('BINDIR', dir_bin)
98config_h.set_quoted('DATADIR', dir_data) 96config_h.set_quoted('DATADIR', dir_data)
99config_h.set10('EFL_HAVE_THREADS', true) 97config_h.set10('EFL_HAVE_THREADS', true)
100config_h.set('NEED_RUN_IN_TREE', '1')
101 98
102config_dir = [include_directories('.')] 99config_dir = [include_directories('.')]
103eolian_include_directories = [] 100eolian_include_directories = []
@@ -231,6 +228,7 @@ foreach package : subprojects
231 #ensure that we really dont copy the eo file targets from a previous library 228 #ensure that we really dont copy the eo file targets from a previous library
232 pub_eo_file_target = [] 229 pub_eo_file_target = []
233 priv_eo_file_target = [] 230 priv_eo_file_target = []
231 pub_eo_files = []
234 232
235 foreach static_lib : package[9] 233 foreach static_lib : package[9]
236 if get_variable(static_lib, tmp_empty) == tmp_empty 234 if get_variable(static_lib, tmp_empty) == tmp_empty
@@ -239,7 +237,8 @@ foreach package : subprojects
239 endforeach 237 endforeach
240 238
241 if (package[3]) 239 if (package[3])
242 subdir(join_paths(local_lib, package_name)) 240 subdir(join_paths(local_lib, package_name))
241 set_variable(package_name + '_eo_files', pub_eo_files)
243 endif 242 endif
244 if (package[2]) 243 if (package[2])
245 subdir(join_paths(local_module, package_name)) 244 subdir(join_paths(local_module, package_name))
@@ -294,7 +293,14 @@ subdir(join_paths('src', 'bin', 'efl'))
294subdir(join_paths('src', 'generic', 'evas')) 293subdir(join_paths('src', 'generic', 'evas'))
295subdir(join_paths('src', 'generic', 'emotion')) 294subdir(join_paths('src', 'generic', 'emotion'))
296 295
297subdir(join_paths('src', 'bindings', 'luajit')) 296bindings = ['luajit', 'cxx']
297
298foreach binding : bindings
299 if get_option(binding)
300 subdir(join_paths('src', 'bindings', binding))
301 endif
302endforeach
303
298subdir(join_paths('src', 'edje_external')) 304subdir(join_paths('src', 'edje_external'))
299 305
300 306
diff --git a/meson_options.txt b/meson_options.txt
index 4460c703aa..5ad5d6c8a6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -309,3 +309,15 @@ option('nls',
309 value: true, 309 value: true,
310 description: 'enable localization: (default=true)' 310 description: 'enable localization: (default=true)'
311) 311)
312
313option('luajit',
314 type: 'boolean',
315 value: true,
316 description: 'Flag for handling lua bindings'
317)
318
319option('cxx',
320 type: 'boolean',
321 value: true,
322 description: 'Flag for handling cxx bindings'
323)
diff --git a/src/bin/eolian_cxx/meson.build b/src/bin/eolian_cxx/meson.build
new file mode 100644
index 0000000000..540a067cdc
--- /dev/null
+++ b/src/bin/eolian_cxx/meson.build
@@ -0,0 +1,6 @@
1eolian_cxx_gen = executable('eolian_cxx',
2 'eolian_cxx.cc',
3 dependencies: [eolian_cxx, eina_cxx, eolian],
4 install: true,
5 cpp_args : package_c_args,
6 )
diff --git a/src/bindings/cxx/ecore_cxx/meson.build b/src/bindings/cxx/ecore_cxx/meson.build
new file mode 100644
index 0000000000..06e648d57b
--- /dev/null
+++ b/src/bindings/cxx/ecore_cxx/meson.build
@@ -0,0 +1,4 @@
1cxx_header_src += files(
2 'Ecore.hh',
3 'Ecore_Manual.hh',
4)
diff --git a/src/bindings/cxx/eet_cxx/meson.build b/src/bindings/cxx/eet_cxx/meson.build
new file mode 100644
index 0000000000..ddc9724ff5
--- /dev/null
+++ b/src/bindings/cxx/eet_cxx/meson.build
@@ -0,0 +1,6 @@
1cxx_header_src += files(
2 'eet_type.hh',
3 'eet_register.hh',
4 'eet_composite.hh',
5 'Eet.hh'
6)
diff --git a/src/bindings/cxx/efl_cxx/meson.build b/src/bindings/cxx/efl_cxx/meson.build
new file mode 100644
index 0000000000..6ad93df23c
--- /dev/null
+++ b/src/bindings/cxx/efl_cxx/meson.build
@@ -0,0 +1,2 @@
1cxx_header_src += join_paths(file_location, 'Efl.hh')
2cxx_header_src += join_paths(file_location, 'cxx', 'efl_part_impl.hh')
diff --git a/src/bindings/cxx/eina_cxx/meson.build b/src/bindings/cxx/eina_cxx/meson.build
new file mode 100644
index 0000000000..fbe6f55ede
--- /dev/null
+++ b/src/bindings/cxx/eina_cxx/meson.build
@@ -0,0 +1,54 @@
1eina_cxx_deps = [eina, eo]
2eina_cxx_pub_deps = []
3
4eina_cxx_header_src = files(
5 'eina_accessor.hh',
6 'eina_aligned_union.hh',
7 'eina_array.hh',
8 'eina_clone_allocators.hh',
9 'eina_deleter.hh',
10 'eina_error.hh',
11 'eina_future.hh',
12 'eina_eo_concrete_fwd.hh',
13 'eina_fold.hh',
14 'eina_function.hh',
15 'eina_inarray.hh',
16 'eina_inlist.hh',
17 'eina_integer_sequence.hh',
18 'eina_iterator.hh',
19 'eina_lists_auxiliary.hh',
20 'eina_list.hh',
21 'eina_log.hh',
22 'eina_logical.hh',
23 'eina_optional.hh',
24 'eina_pp.hh',
25 'eina_ptrarray.hh',
26 'eina_ptrlist.hh',
27 'eina_range_types.hh',
28 'eina_ref.hh',
29 'eina_stringshare.hh',
30 'eina_strbuf.hh',
31 'eina_string_view.hh',
32 'eina_thread.hh',
33 'eina_throw.hh',
34 'eina_tuple.hh',
35 'eina_tuple_c.hh',
36 'eina_tuple_unwrap.hh',
37 'eina_type_traits.hh',
38 'eina_value.hh',
39 'eina_workarounds.hh',
40 'eina_copy_traits.hh',
41 'eina_variant.hh',
42 'Eina.hh'
43)
44
45eina_cxx_lib = disabler()
46
47eina_cxx = declare_dependency(
48 include_directories: [include_directories('.')],
49 dependencies: eina_cxx_deps
50)
51
52install_headers(eina_cxx_header_src,
53 subdir: dir_package_include
54)
diff --git a/src/bindings/cxx/eldbus_cxx/meson.build b/src/bindings/cxx/eldbus_cxx/meson.build
new file mode 100644
index 0000000000..dbd038d11b
--- /dev/null
+++ b/src/bindings/cxx/eldbus_cxx/meson.build
@@ -0,0 +1,14 @@
1cxx_header_src += files(
2 'eldbus_basic.hh',
3 'eldbus_error.hh',
4 'eldbus_freedesktop.hh',
5 'Eldbus.hh',
6 'eldbus_integer_sequence.hh',
7 'eldbus_message_arguments.hh',
8 'eldbus_message.hh',
9 'Eldbus_Model.hh',
10 'eldbus_proxy_call.hh',
11 'eldbus_raw_tuple.hh',
12 'eldbus_service.hh',
13 'eldbus_signature_traits.hh',
14)
diff --git a/src/bindings/cxx/eo_cxx/meson.build b/src/bindings/cxx/eo_cxx/meson.build
new file mode 100644
index 0000000000..3b1bc25ec6
--- /dev/null
+++ b/src/bindings/cxx/eo_cxx/meson.build
@@ -0,0 +1,11 @@
1cxx_header_src = files(
2 'eo_concrete.hh',
3 'eo_cxx_interop.hh',
4 'eo_event.hh',
5 'Eo.hh',
6 'eo_init.hh',
7 'eo_ops.hh',
8 'eo_wref.hh',
9 'eo_private.hh',
10 'efl_object_impl.hh'
11)
diff --git a/src/bindings/cxx/eolian_cxx/meson.build b/src/bindings/cxx/eolian_cxx/meson.build
new file mode 100644
index 0000000000..219ffa334b
--- /dev/null
+++ b/src/bindings/cxx/eolian_cxx/meson.build
@@ -0,0 +1,72 @@
1
2name_eolian_cxx_header_src= [
3 'Eolian_Cxx.hh'
4]
5
6name_grammer_eolian_cxx_header_src= [
7 'address_of.hpp',
8 'alternative.hpp',
9 'attribute_conditional.hpp',
10 'attribute_reorder.hpp',
11 'attribute_replace.hpp',
12 'attributes.hpp',
13 'blacklist.hpp',
14 'base_class_definition.hpp',
15 'case.hpp',
16 'class_declaration.hpp',
17 'class_definition.hpp',
18 'class_implementation.hpp',
19 'container.hpp',
20 'context.hpp',
21 'converting_argument.hpp',
22 'c_type.hpp',
23 'eps.hpp',
24 'function_declaration.hpp',
25 'function_definition.hpp',
26 'generator.hpp',
27 'header_guards.hpp',
28 'header.hpp',
29 'header_include_directive.hpp',
30 'html_escaped_string.hpp',
31 'implementation_include_directive.hpp',
32 'impl_header.hpp',
33 'indentation.hpp',
34 'integral.hpp',
35 'keyword.hpp',
36 'klass_def.hpp',
37 'kleene.hpp',
38 'list.hpp',
39 'meta.hpp',
40 'namespace.hpp',
41 'parameter.hpp',
42 'part_declaration.hpp',
43 'part_implementation.hpp',
44 'qualifier_def.hpp',
45 'sequence.hpp',
46 'string.hpp',
47 'type_function_declaration.hpp',
48 'type.hpp',
49 'type_impl.hpp',
50 'types_definition.hpp',
51 'type_traits.hpp'
52]
53
54cxx_header_src = []
55
56foreach header : name_eolian_cxx_header_src
57 cxx_header_src += files(join_paths('..', '..', '..', 'lib', 'eolian_cxx', header))
58endforeach
59
60foreach header : name_grammer_eolian_cxx_header_src
61 cxx_header_src += files(join_paths('..', '..', '..', 'lib', 'eolian_cxx', 'grammar', header))
62endforeach
63
64inc_dir = include_directories(join_paths('..', '..', '..', 'lib', 'eolian_cxx'))
65
66eolian_cxx_gen = executable('eolian_cxx',
67 join_paths('..', '..', '..', 'bin', 'eolian_cxx', 'eolian_cxx.cc'),
68 dependencies: [eina_cxx, eolian],
69 install: true,
70 include_directories : inc_dir,
71 cpp_args : package_c_args,
72 )
diff --git a/src/bindings/cxx/meson.build b/src/bindings/cxx/meson.build
new file mode 100644
index 0000000000..7a7000084c
--- /dev/null
+++ b/src/bindings/cxx/meson.build
@@ -0,0 +1,101 @@
1
2# ['eina', 'eolian', 'eo'] those three are build in the root meson.build reason for this is the super special handling
3cxx_sublibs = [
4 ['Eina', true, true, false, [eo]],
5 ['Eolian', true, true, false, []],
6 ['Eo', true, true, false, []],
7 ['Ecore', true, true, true, []],
8 ['Eet', true, true, false, []],
9 ['Efl', true, false, true, []],
10 ['Eio', false, false, true, []],
11 ['Evas', false, true, true, []],
12 ['Edje', false, false, true, []],
13 ['Eldbus', true, true, true, []],
14 ['Elementary', false, true, true, []]
15]
16
17increased_dependency = []
18
19foreach lib : cxx_sublibs
20 package_name = lib[0].to_lower()
21 package_version_name = '-'.join(package_name.split('_')) + '-cxx-' + version_major
22 package_c_args = [
23 '-DPACKAGE_DATA_DIR="'+ join_paths(dir_data, package_name)+'"',
24 '-DNEED_RUN_IN_TREE=1'
25 ]
26
27 dir_package_include = join_paths(dir_include, package_version_name)
28 dir_package_modules = join_paths(dir_lib, package_name, 'modules')
29 cxx_generator_target = []
30 cxx_header_src = []
31 file_location = join_paths('..', '..', 'lib', package_name)
32 eo_file_list = []
33 eo_file_subdirs = get_variable(package_name + '_eo_subdirs', [''])
34
35 #generate files for each .eo files
36 foreach eo_file_subdir : eo_file_subdirs
37 if eo_file_subdir != ''
38 cxx_pub_eo_files = get_variable(package_name + '_' + eo_file_subdir +'_eo_files')
39 else
40 cxx_pub_eo_files = get_variable(package_name +'_eo_files')
41 endif
42 subdir_file_location = join_paths(file_location, eo_file_subdir)
43 foreach cxx_gen_file : cxx_pub_eo_files
44 cxx_generator_target += custom_target('eolian_cxx_gen_'+cxx_gen_file.underscorify()+'',
45 input : join_paths(subdir_file_location, cxx_gen_file),
46 output : [cxx_gen_file + '.hh', cxx_gen_file + '.impl.hh'],
47 install : true,
48 install_dir : join_paths(dir_package_include, eo_file_subdir),
49 command : [eolian_cxx_gen, '-I', meson.current_source_dir(), eolian_include_directories,
50 '-o', join_paths(meson.current_build_dir(), cxx_gen_file + '.hh'),
51 '@INPUT@'])
52 eo_file_list += files(join_paths(subdir_file_location, cxx_gen_file))
53 endforeach
54 endforeach
55
56 #generate the package.eo.hh file
57 if lib[3]
58 cxx_generator_target += custom_target('eolian_cxx_gen_'+package_name+'.eo.hh',
59 input : eo_file_list,
60 output : [lib[0] + '.eo.hh'],
61 install : true,
62 install_dir : join_paths(dir_package_include),
63 command : [eolian_cxx_gen, '-I', meson.current_source_dir(), eolian_include_directories, '-m',
64 '-o', '@OUTPUT@',
65 '@INPUT@'])
66 endif
67
68 if lib[1]
69 inc_dir = include_directories(package_name+'_cxx', '.')
70 subdir(package_name+'_cxx')
71 else
72 inc_dir = include_directories(file_location, '.')
73 cxx_header_src += files(join_paths(file_location, lib[0]+'.hh'))
74 endif
75
76 dep = declare_dependency(
77 include_directories: inc_dir,
78 sources : cxx_generator_target,
79 dependencies: [get_variable(package_name)] + get_variable(package_name + '_pub_deps') + lib[4] + increased_dependency
80 )
81
82 increased_dependency += dep
83
84 set_variable(package_name + '_cxx', dep)
85
86 install_headers(cxx_header_src,
87 subdir: dir_package_include
88 )
89 if lib[2]
90 test_dirs += package_name + '_cxx'
91 endif
92 pkgconfig.generate(
93 name : '-'.join(package_name.split('_')) + '-cxx',
94 description : lib[0]+' cxx bindings',
95 subdirs : package_version_name,
96 version : version_major + '.' + version_minor,
97 libraries : dep,
98 #for now - just drag the whole elementary in
99 requires : 'elementary',
100 )
101endforeach
diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build
index 8d29c404a8..078e43f8c6 100644
--- a/src/lib/efl/interfaces/meson.build
+++ b/src/lib/efl/interfaces/meson.build
@@ -107,6 +107,8 @@ foreach eo_file : pub_eo_files
107 '-gch', '@INPUT@']) 107 '-gch', '@INPUT@'])
108endforeach 108endforeach
109 109
110pub_eo_files += pub_legacy_eo_files
111
110pub_eo_types_files = [ 112pub_eo_types_files = [
111 'efl_gfx_types.eot', 113 'efl_gfx_types.eot',
112 'efl_ui_types.eot', 114 'efl_ui_types.eot',
@@ -126,7 +128,13 @@ foreach eo_file : pub_eo_types_files
126 '-gh', '@INPUT@']) 128 '-gh', '@INPUT@'])
127endforeach 129endforeach
128 130
129pub_eo_files = files(pub_eo_files + pub_legacy_eo_files + pub_eo_types_files) 131install_data(pub_eo_files + pub_legacy_eo_files + pub_eo_types_files,
132 install_dir: join_paths(eolian_include_dir, package_version_name)
133)
134
135efl_interfaces_eo_files = pub_eo_files
136
137pub_eo_files = []
130 138
131efl_src += files([ 139efl_src += files([
132 'efl_interfaces_main.c', 140 'efl_interfaces_main.c',
diff --git a/src/lib/efl/meson.build b/src/lib/efl/meson.build
index 75acef3b54..6677cf2327 100644
--- a/src/lib/efl/meson.build
+++ b/src/lib/efl/meson.build
@@ -24,10 +24,8 @@ efl = declare_dependency(
24 sources : pub_eo_file_target 24 sources : pub_eo_file_target
25) 25)
26 26
27install_data(pub_eo_files,
28 install_dir: join_paths(eolian_include_dir, package_version_name)
29)
30
31install_headers(efl_header_src, 27install_headers(efl_header_src,
32 install_dir : dir_package_include, 28 install_dir : dir_package_include,
33) 29)
30
31efl_eo_subdirs = ['interfaces']
diff --git a/src/lib/evas/canvas/meson.build b/src/lib/evas/canvas/meson.build
index 47db33de4b..e6298f70cd 100644
--- a/src/lib/evas/canvas/meson.build
+++ b/src/lib/evas/canvas/meson.build
@@ -77,6 +77,8 @@ pub_eo_files = [
77 'efl_canvas_text.eo' 77 'efl_canvas_text.eo'
78] 78]
79 79
80evas_canvas_eo_files = pub_eo_files
81
80pub_evas_eo_files += files(pub_eo_files) 82pub_evas_eo_files += files(pub_eo_files)
81 83
82foreach eo_file : pub_eo_files 84foreach eo_file : pub_eo_files
diff --git a/src/lib/evas/gesture/meson.build b/src/lib/evas/gesture/meson.build
index 62d9b27599..cd755f51c3 100644
--- a/src/lib/evas/gesture/meson.build
+++ b/src/lib/evas/gesture/meson.build
@@ -7,6 +7,8 @@ pub_eo_files = [
7 'efl_canvas_gesture_manager.eo' 7 'efl_canvas_gesture_manager.eo'
8] 8]
9 9
10evas_gesture_eo_files = pub_eo_files
11
10foreach eo_file : pub_eo_files 12foreach eo_file : pub_eo_files
11 pub_eo_file_target += custom_target('eolian_gen_' + eo_file, 13 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
12 input : eo_file, 14 input : eo_file,
diff --git a/src/lib/evas/meson.build b/src/lib/evas/meson.build
index d72032d957..8175c87565 100644
--- a/src/lib/evas/meson.build
+++ b/src/lib/evas/meson.build
@@ -173,3 +173,5 @@ install_headers(evas_header_src,
173) 173)
174 174
175automatic_pkgfile = false 175automatic_pkgfile = false
176pub_eo_files = []
177evas_eo_subdirs = ['canvas', 'gesture']
diff --git a/src/lib/evas_goal/meson.build b/src/lib/evas_goal/meson.build
index 057006884c..28db42f00b 100644
--- a/src/lib/evas_goal/meson.build
+++ b/src/lib/evas_goal/meson.build
@@ -7,9 +7,11 @@ evas_lib = library('evas',
7 version : meson.project_version() 7 version : meson.project_version()
8) 8)
9 9
10evas_pub_deps = [eina, ecore, ector, emile, evas_pre]
11
10evas = declare_dependency( 12evas = declare_dependency(
11 link_with : [evas_lib], 13 link_with : [evas_lib],
12 dependencies : [eina, ecore, ector, emile, evas_pre], 14 dependencies : evas_pub_deps,
13 include_directories : evas_include_directories 15 include_directories : evas_include_directories
14) 16)
15 17
diff --git a/src/tests/ecore_cxx/meson.build b/src/tests/ecore_cxx/meson.build
new file mode 100644
index 0000000000..75547f1258
--- /dev/null
+++ b/src/tests/ecore_cxx/meson.build
@@ -0,0 +1,29 @@
1ecore_cxx_suite_deps = [check, ecore_cxx]
2
3ecore_cxx_suite_src = [
4 'ecore_cxx_suite.cc',
5 'ecore_cxx_suite.h',
6 'ecore_cxx_test_safe_call.cc',
7]
8
9
10ecore_cxx_suite = executable('ecore_cxx_suite',
11 ecore_cxx_suite_src,
12 dependencies: [ecore_cxx_suite_deps, check],
13 cpp_args : [
14 '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
15 '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
16)
17
18executable('ecore_cxx_suite_compile_test',
19 'cxx_compile_test.cc',
20 dependencies: [ecore_cxx_suite_deps, check],
21 cpp_args : [
22 '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
23 '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
24)
25
26test('ecore_cxx-suite', ecore_cxx_suite,
27 timeout : 10*60,
28 env : test_env
29)
diff --git a/src/tests/edje_cxx/meson.build b/src/tests/edje_cxx/meson.build
new file mode 100644
index 0000000000..0d706a294f
--- /dev/null
+++ b/src/tests/edje_cxx/meson.build
@@ -0,0 +1,9 @@
1edje_cxx_suite_deps = [check, edje_cxx]
2
3executable('edje_cxx_suite_compile_test',
4 'cxx_compile_test.cc',
5 dependencies: [edje_cxx_suite_deps, check],
6 cpp_args : [
7 '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
8 '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
9)
diff --git a/src/tests/eet_cxx/meson.build b/src/tests/eet_cxx/meson.build
new file mode 100644
index 0000000000..f3f3fb8046
--- /dev/null
+++ b/src/tests/eet_cxx/meson.build
@@ -0,0 +1,21 @@
1eet_cxx_suite_deps = [check, eet_cxx]
2
3eet_cxx_suite_src = [
4 'eet_cxx_suite.cc',
5 'eet_cxx_suite.h',
6 'eet_cxx_test_descriptors.cc',
7]
8
9eet_cxx_suite = executable('eet_cxx_suite',
10 eet_cxx_suite_src,
11 dependencies: [eet_cxx_suite_deps, check],
12 cpp_args : [
13 '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
14 '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
15)
16
17
18test('ecore_cxx-suite', eet_cxx_suite,
19 timeout : 10*60,
20 env : test_env
21)
diff --git a/src/tests/eina_cxx/meson.build b/src/tests/eina_cxx/meson.build
new file mode 100644
index 0000000000..c5f0f23bb4
--- /dev/null
+++ b/src/tests/eina_cxx/meson.build
@@ -0,0 +1,57 @@
1eina_cxx_suite_deps = [check]
2
3eina_cxx_suite_src = [
4 'eina_cxx_suite.cc',
5 'eina_cxx_test_inlist.cc',
6 'eina_cxx_test_log.cc',
7 'eina_cxx_test_inarray.cc',
8 'eina_cxx_test_iterator.cc',
9 'eina_cxx_test_ptrarray.cc',
10 'eina_cxx_test_ptrlist.cc',
11 'eina_cxx_test_stringshare.cc',
12 'eina_cxx_test_error.cc',
13 'eina_cxx_test_accessor.cc',
14 'eina_cxx_test_thread.cc',
15 'eina_cxx_test_optional.cc',
16 'eina_cxx_test_value.cc',
17 'simple.c',
18 'eina_cxx_suite.h'
19]
20
21
22pub_eo_files = [
23 'simple.eo'
24]
25
26foreach eo_file : pub_eo_files
27 priv_eo_file_target += custom_target('eolian_gen_eina_cxx_' + eo_file,
28 input : eo_file,
29 output : [eo_file + '.h'],
30 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
31 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
32 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
33 '-gch', '@INPUT@'])
34 priv_eo_file_target += custom_target('eolian_cxx_gen_eina_cxx_' + eo_file,
35 input : eo_file,
36 output : [eo_file + '.hh'],
37 install : true,
38 install_dir : dir_package_include,
39 command : [eolian_cxx_gen, '-I', meson.current_source_dir(), eolian_include_directories,
40 '-o', join_paths(meson.current_build_dir(), eo_file + '.hh'),
41 '@INPUT@'])
42endforeach
43
44eina_cxx_suite = executable('eina_cxx_suite',
45 eina_cxx_suite_src + priv_eo_file_target,
46 include_directories : config_dir,
47 dependencies: [eina_cxx_suite_deps, check, eina, eina_cxx, eo_cxx, ecore],
48 cpp_args : [
49 '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
50 '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'
51 ]
52)
53
54test('eina_cxx-suite', eina_cxx_suite,
55 timeout : 10*60,
56 env : test_env
57)
diff --git a/src/tests/eldbus_cxx/meson.build b/src/tests/eldbus_cxx/meson.build
new file mode 100644
index 0000000000..e3e04e5290
--- /dev/null
+++ b/src/tests/eldbus_cxx/meson.build
@@ -0,0 +1,21 @@
1eldbus_cxx_suite_deps = [check, eldbus_cxx]
2
3eldbus_cxx_suite_src = [
4 'eldbus_cxx_suite.cc',
5 'eldbus_cxx_suite.h',
6 'eldbus_cxx_test_eldbus_client.cc',
7 'eldbus_cxx_test_eldbus_connect.cc',
8]
9
10eldbus_cxx_suite = executable('eldbus_cxx_suite',
11 eldbus_cxx_suite_src,
12 dependencies: [eldbus_cxx_suite_deps, check],
13 cpp_args : [
14 '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
15 '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
16)
17
18test('eldbus_cxx-suite', eldbus_cxx_suite,
19 timeout : 10*60,
20 env : test_env
21)
diff --git a/src/tests/elementary_cxx/meson.build b/src/tests/elementary_cxx/meson.build
new file mode 100644
index 0000000000..1ced02bdca
--- /dev/null
+++ b/src/tests/elementary_cxx/meson.build
@@ -0,0 +1,9 @@
1elementary_cxx_suite_deps = [check, elementary_cxx]
2
3executable('elementary_cxx_suite_compile_test',
4 ['cxx_compile_test.cc', 'cxx_dummy_compile_test.cc'],
5 dependencies: [elementary_cxx_suite_deps, check],
6 cpp_args : [
7 '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
8 '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
9)
diff --git a/src/tests/eo_cxx/meson.build b/src/tests/eo_cxx/meson.build
new file mode 100644
index 0000000000..43e487da57
--- /dev/null
+++ b/src/tests/eo_cxx/meson.build
@@ -0,0 +1,20 @@
1eo_cxx_suite_deps = [check, eina_cxx, eo_cxx]
2
3eo_cxx_suite_src = [
4 'eo_cxx_suite.cc',
5 'eo_cxx_suite.h'
6]
7
8eo_cxx_suite = executable('eo_cxx_suite',
9 eo_cxx_suite_src,
10 include_directories : config_dir,
11 dependencies: [eo_cxx_suite_deps, check],
12 cpp_args : [
13 '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
14 '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
15)
16
17test('eo_cxx-suite', eo_cxx_suite,
18 timeout : 10*60,
19 env : test_env
20)
diff --git a/src/tests/eolian_cxx/meson.build b/src/tests/eolian_cxx/meson.build
new file mode 100644
index 0000000000..f4daf82a85
--- /dev/null
+++ b/src/tests/eolian_cxx/meson.build
@@ -0,0 +1,78 @@
1eolian_cxx_suite_deps = [check, eolian_cxx, eina_cxx, eo_cxx, ecore]
2
3eolian_cxx_suite_src = files([
4 'eolian_cxx_suite.cc',
5 'eolian_cxx_test_parse.cc',
6 'a.c',
7 'b.c',
8 'c.c',
9 'd.c',
10 'eolian_cxx_test_binding.cc',
11 'eolian_cxx_test_address_of.cc',
12 'eolian_cxx_test_wrapper.cc',
13 'simple.c',
14 'name_name.c',
15 'name_name_cxx.cc',
16 'generic.c',
17 'name1_name2_type_generation.c',
18 'eolian_cxx_test_inheritance.cc',
19 'eolian_cxx_test_generate.cc',
20 'eolian_cxx_test_documentation.cc',
21 'eolian_cxx_test_cyclic.cc',
22 'complex.c',
23 'complex_cxx.cc',
24 'eolian_cxx_suite.h'
25])
26
27pub_eo_files = [
28 'a.eo',
29 'b.eo',
30 'c.eo',
31 'd.eo',
32 'complex.eo',
33 'cyclic1.eo',
34 'cyclic2.eo',
35 'docs.eo',
36 'generic.eo',
37 'name1_name2_type_generation.eo',
38 'name_name.eo',
39 'ns_name.eo',
40 'ns_name_other.eo',
41 'simple.eo'
42]
43
44pub_eo_file_target = []
45
46foreach eo_file : pub_eo_files
47 pub_eo_file_target += custom_target('eolian_cxx_gen_' + eo_file,
48 input : eo_file,
49 output : [eo_file + '.hh'],
50 install : true,
51 install_dir : dir_package_include,
52 command : [eolian_cxx_gen, '-I', meson.current_source_dir(), eolian_include_directories,
53 '-o', join_paths(meson.current_build_dir(), eo_file + '.hh'),
54 '@INPUT@'])
55 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
56 input : eo_file,
57 output : [eo_file + '.h'],
58 install : true,
59 install_dir : dir_package_include,
60 command : [eolian_gen, '-I', meson.current_source_dir(), eolian_include_directories,
61 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
62 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
63 '-gch', '@INPUT@'])
64endforeach
65
66eolian_cxx_suite = executable('eolian_cxx_suite',
67 eolian_cxx_suite_src + pub_eo_file_target,
68 dependencies: [eolian_cxx_suite_deps, eo_cxx, check],
69 # package_c_args contains -D definitions for the package
70 cpp_args : package_c_args +[
71 '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
72 '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
73)
74
75test('eolian_cxx-suite', eolian_cxx_suite,
76 timeout : 10*60,
77 env : test_env
78)
diff --git a/src/tests/evas_cxx/meson.build b/src/tests/evas_cxx/meson.build
new file mode 100644
index 0000000000..d84c1e2c12
--- /dev/null
+++ b/src/tests/evas_cxx/meson.build
@@ -0,0 +1,9 @@
1evas_cxx_suite_deps = [check, evas_cxx]
2
3executable('evas_cxx_suite_compile_test',
4 'cxx_compile_test.cc',
5 dependencies: [evas_cxx_suite_deps, check],
6 cpp_args : [
7 '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
8 '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
9)