aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/edje/meson.build
blob: 549553fd6732b262a7938ee884fe799eb98623d9 (plain) (blame)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
edje_deps = [
  eina, eo, efl, m,
  eet, evas, ecore_evas,
  ecore_file, ecore_input,
  ecore_imf, ecore_imf_evas,
  embryo, efreet, eio, intl
]

edje_pub_deps = [m, evas, eo, efl, lua]

if (get_option('physics'))
  edje_deps += ephysics
  edje_pub_deps += ephysics
endif

config_h.set('EDJE_CALC_CACHE', '1')

if get_option('edje-sound-and-video')
  config_h.set('ENABLE_MULTISENSE', '1')
  edje_deps += ecore_audio
endif

pub_legacy_eo_files = [
  'edje_edit.eo',
  'efl_layout_calc.eo',
  'efl_layout_signal.eo',
  'efl_layout_group.eo',
  'efl_canvas_layout.eo',
  'efl_canvas_layout_part.eo',
  'efl_canvas_layout_part_box.eo',
  'efl_canvas_layout_part_external.eo',
  'efl_canvas_layout_part_invalid.eo',
  'efl_canvas_layout_part_swallow.eo',
  'efl_canvas_layout_part_table.eo',
  'efl_canvas_layout_part_text.eo',
]

pub_eo_files = pub_legacy_eo_files
pub_eo_file_target = []

foreach eo_file : pub_legacy_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@'])
  pub_eo_file_target += custom_target('eolian_gen_legacy_' + eo_file,
    input : eo_file,
    output : [eo_file + '.legacy.h'],
    depfile : eo_file + '.legacy.d',
    install : true,
    install_dir : dir_package_include,
    command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
                           '-o', 'l:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.h'),
                           '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.legacy.d'),
                           '-gld', '@INPUT@'])
endforeach

pub_eo_types_files = [
  'edje_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

priv_eo_files = [
  'edje_global.eo',
]

priv_eo_file_target = []
foreach eo_file : priv_eo_files
  priv_eo_file_target += custom_target('eolian_gen_' + eo_file,
    input : eo_file,
    output : [eo_file + '.h'],
    depfile : eo_file + '.d',
    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'),
                           '-gchd', '@INPUT@'])
endforeach


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

edje_header_src = [
  'Edje.h',
  'Edje_Common.h',
  'Edje_Eo.h',
  'Edje_Legacy.h',
  'Edje_Edit.h'
]

edje_src = [
  'edje_private.h',
  'edje_convert.h',
  'edje_box_layout.c',
  'edje_cache.c',
  'edje_calc.c',
  'edje_callbacks.c',
  'edje_data.c',
  'edje_edit.c',
  'edje_embryo.c',
  'edje_entry.c',
  'edje_external.c',
  'edje_load.c',
  'edje_lua.c',
  'edje_lua2.c',
  'edje_lua_script_only.c',
  'edje_main.c',
  'edje_match.c',
  'edje_message_queue.c',
  'edje_misc.c',
  'edje_module.c',
  'edje_multisense.c',
  'edje_program.c',
  'edje_smart.c',
  'edje_text.c',
  'edje_textblock.c',
  'edje_textblock_styles.c',
  'edje_util.c',
  'edje_legacy.c',
  'edje_var.c',
  'edje_signal.c',
  'edje_part.c',
  'edje_part_helper.h',
  'edje_part_external.c',
  'edje_part_swallow.c',
  'edje_part_table.c',
  'edje_part_box.c',
  'edje_part_text.c',
  'edje_part_invalid.c'

]

edje_lib = library('edje',
    edje_src, pub_eo_file_target, priv_eo_file_target,
    dependencies: edje_pub_deps + edje_deps,
    include_directories : config_dir + [include_directories('.')],
    install: true,
    c_args : [package_c_args],
    version : meson.project_version()
)

edje = declare_dependency(
  include_directories: [include_directories('.')],
  link_with: edje_lib,
  sources : pub_eo_file_target + priv_eo_file_target,
  dependencies: edje_pub_deps,
)

install_data(pub_eo_files + pub_eo_types_files,
  install_dir: join_paths(eolian_include_dir, package_version_name)
)

install_headers(edje_header_src,
  install_dir : dir_package_include,
)