summaryrefslogtreecommitdiff
path: root/src/bindings/cxx
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-10-19 16:18:39 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-10-24 12:05:58 +0200
commite85311c99286988f98ce081148f6f9e298086c2d (patch)
tree9479f9b7c887904044b08fd2fb217f8b41971837 /src/bindings/cxx
parente19d2391476965d7b8e8865a766734947cc3099f (diff)
meson: here comes cxx bindings
this commits is bringing cxx bindings. You can enable / disable them with the cxx option. Differential Revision: https://phab.enlightenment.org/D7181
Diffstat (limited to 'src/bindings/cxx')
-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.build5
-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.build112
8 files changed, 278 insertions, 0 deletions
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..44113d324a
--- /dev/null
+++ b/src/bindings/cxx/efl_cxx/meson.build
@@ -0,0 +1,5 @@
1cxx_header_src += join_paths(file_location, 'Efl.hh')
2
3install_headers(join_paths('..', file_location, 'cxx', 'efl_part_impl.hh'),
4 subdir: join_paths(dir_package_include, 'cxx')
5)
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..f4b99f6c46
--- /dev/null
+++ b/src/bindings/cxx/meson.build
@@ -0,0 +1,112 @@
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 = []
18growing_deps = []
19
20foreach lib : cxx_sublibs
21 package_name = lib[0].to_lower()
22 package_top_header = lib[3]
23 package_has_tests = lib[2]
24 package_manual_binded = lib[1]
25 package_version_name = '-'.join(package_name.split('_')) + '-cxx-' + version_major
26 tmp_package_subdirs = [package_version_name]
27
28 package_c_args = [
29 '-DPACKAGE_DATA_DIR="'+ join_paths(dir_data, package_name)+'"',
30 '-DNEED_RUN_IN_TREE=1'
31 ]
32
33 dir_package_include = join_paths(dir_include, package_version_name)
34 dir_package_modules = join_paths(dir_lib, package_name, 'modules')
35 cxx_generator_target = []
36 cxx_header_src = []
37 file_location = join_paths('..', '..', 'lib', package_name)
38 eo_file_list = []
39 eo_file_subdirs = get_variable(package_name + '_eo_subdirs')
40 #generate files for each .eo files
41 foreach eo_file_subdir : eo_file_subdirs
42 if eo_file_subdir != ''
43 cxx_pub_eo_files = get_variable(package_name + '_' + eo_file_subdir +'_eo_files')
44 else
45 cxx_pub_eo_files = get_variable(package_name +'_eo_files')
46 endif
47 subdir_file_location = join_paths(file_location, eo_file_subdir)
48 foreach cxx_gen_file : cxx_pub_eo_files
49 cxx_generator_target += custom_target('eolian_cxx_gen_'+cxx_gen_file.underscorify()+'',
50 input : join_paths(subdir_file_location, cxx_gen_file),
51 output : [cxx_gen_file + '.hh', cxx_gen_file + '.impl.hh'],
52 install : true,
53 install_dir : join_paths(dir_package_include, eo_file_subdir),
54 command : [eolian_cxx_gen, '-I', meson.current_source_dir(), eolian_include_directories,
55 '-o', join_paths(meson.current_build_dir(), cxx_gen_file + '.hh'),
56 '@INPUT@'])
57 eo_file_list += files(join_paths(subdir_file_location, cxx_gen_file))
58 endforeach
59 endforeach
60
61 #generate the package.eo.hh file
62 if package_top_header
63 cxx_generator_target += custom_target('eolian_cxx_gen_'+package_name+'.eo.hh',
64 input : eo_file_list,
65 output : [lib[0] + '.eo.hh'],
66 install : true,
67 install_dir : join_paths(dir_package_include),
68 command : [eolian_cxx_gen, '-I', meson.current_source_dir(), eolian_include_directories, '-m',
69 '-o', '@OUTPUT@',
70 '@INPUT@'])
71 endif
72
73 if package_manual_binded
74 inc_dir = include_directories(package_name+'_cxx', '.')
75 subdir(package_name+'_cxx')
76 else
77 inc_dir = include_directories(file_location, '.')
78 cxx_header_src += files(join_paths(file_location, lib[0]+'.hh'))
79 endif
80
81 dep = declare_dependency(
82 include_directories: inc_dir,
83 sources : cxx_generator_target,
84 dependencies: [get_variable(package_name)] + get_variable(package_name + '_pub_deps') + lib[4] + increased_dependency
85 )
86
87 increased_dependency += dep
88
89 set_variable(package_name + '_cxx', dep)
90
91 if package_has_tests
92 test_dirs += package_name + '_cxx'
93 endif
94
95 foreach subdir : get_variable(package_name + '_eo_subdirs')
96 tmp_package_subdirs += join_paths(package_version_name, subdir)
97 endforeach
98
99 install_headers(cxx_header_src,
100 subdir: dir_package_include
101 )
102
103 pkgconfig.generate(
104 name : '-'.join(package_name.split('_')) + '-cxx',
105 description : lib[0]+' cxx bindings',
106 subdirs : tmp_package_subdirs,
107 version : version_major + '.' + version_minor,
108 libraries : dep,
109 requires : growing_deps + [package_name],
110 )
111 growing_deps += package_name + '-cxx'
112endforeach