summaryrefslogtreecommitdiff
path: root/src/lib/eldbus/meson.build
blob: de9902757d114ae4fd923497d1ea8154805aafb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
eldbus_deps = [ecore]
eldbus_pub_deps = [eina, eo, efl]

pub_eo_files = [
  'eldbus_model_connection.eo',
  'eldbus_model_object.eo',
  'eldbus_model_proxy.eo',
  'eldbus_model_method.eo',
  'eldbus_model_arguments.eo',
  'eldbus_model_signal.eo',
  'eldbus_model.eo'
]

foreach eo_file : pub_eo_files
  pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
    input : eo_file,
    output : [eo_file + '.h'],
    depfile : eo_file + '.d',
    install : true,
    install_dir : dir_package_include,
    command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
                           '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
                           '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
                           '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
                           '-gchd', '@INPUT@'])
endforeach


pub_eo_types_files = [
  'eldbus_types.eot'
]

foreach eo_file : pub_eo_types_files
  pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
    input : eo_file,
    output : [eo_file + '.h'],
    depfile : eo_file + '.d',
    install : true,
    install_dir : dir_package_include,
    command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
                           '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
                           '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
                           '-ghd', '@INPUT@'])
endforeach

eolian_include_directories += ['-I', meson.current_source_dir()]

eldbus_header_src = [
  'Eldbus.h',
  'eldbus_connection.h',
  'eldbus_freedesktop.h',
  'eldbus_message.h',
  'eldbus_object.h',
  'eldbus_pending.h',
  'eldbus_proxy.h',
  'eldbus_service.h',
  'eldbus_signal_handler.h',
  'eldbus_message_helper.h',
  'eldbus_introspection.h',
  'Eldbus_Model.h',
  'eldbus_message_eina_value.h'
]

eldbus_src = [
  'eldbus_private.h',
  'eldbus_private_types.h',
  'eldbus_model_private.h',
  'eldbus_model_proxy_private.h',
  'eldbus_model_object_private.h',
  'eldbus_model_arguments_private.h',
  'eldbus_model_connection_private.h',
  'eldbus_model_signal_private.h',
  'eldbus_model_method_private.h',
  'eldbus_proxy.c',
  'eldbus_core.c',
  'eldbus_message.c',
  'eldbus_object.c',
  'eldbus_pending.c',
  'eldbus_freedesktop.c',
  'eldbus_service.c',
  'eldbus_signal_handler.c',
  'eldbus_message_helper.c',
  'eldbus_message_to_eina_value.c',
  'eldbus_message_from_eina_value.c',
  'eldbus_model.c',
  'eldbus_model_connection.c',
  'eldbus_model_object.c',
  'eldbus_model_proxy.c',
  'eldbus_model_method.c',
  'eldbus_model_arguments.c',
  'eldbus_model_signal.c',
  'eldbus_introspection.c'
]

eldbus_deps += dependency('dbus-1')

eldbus_lib = library('eldbus',
    eldbus_src, pub_eo_file_target,
    dependencies: eldbus_pub_deps + eldbus_deps,
    include_directories : config_dir,
    install: true,
    version : meson.project_version()
)

eldbus = declare_dependency(
  include_directories: [include_directories('.')],
  link_with: eldbus_lib,
  sources : pub_eo_file_target + priv_eo_file_target,
  dependencies: eldbus_pub_deps,
)


if get_option('install-eo-files')
  install_data(pub_eo_files + pub_eo_types_files,
    install_dir: join_paths(eolian_include_dir, package_version_name)
  )
endif

install_headers(eldbus_header_src,
  install_dir : dir_package_include,
)