summaryrefslogtreecommitdiff
path: root/src/lib/eeze
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-08-12 15:26:29 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-10-02 17:22:50 +0200
commit46d464e5bfc10398461a33a2256c1c58d509dd1a (patch)
tree8c1a9272c05f14033a4430bc122632461bd73608 /src/lib/eeze
parent70ecf1056bb4be5a68b63044f938ccc2fe0a58c0 (diff)
here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min.. 1 min. conf time 2:30 min. build time Where autotools takes: 1:50 min. conf time 3:40 min. build time. meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read. Further informations can be gathered from the README.meson Right now, bindings & windows support are missing. It is highly recommented to use meson 0.48 due to optimizations in meson that reduced the time the meson call would need. Co-authored-by: Mike Blumenkrantz <zmike@samsung.com> Differential Revision: https://phab.enlightenment.org/D7012 Depends on D7011
Diffstat (limited to 'src/lib/eeze')
-rw-r--r--src/lib/eeze/meson.build101
1 files changed, 101 insertions, 0 deletions
diff --git a/src/lib/eeze/meson.build b/src/lib/eeze/meson.build
new file mode 100644
index 0000000000..c32eee94b6
--- /dev/null
+++ b/src/lib/eeze/meson.build
@@ -0,0 +1,101 @@
1eeze_deps = []
2eeze_pub_deps = [eina, efl]
3pub_eo_file_target = []
4
5eeze_header_src = [
6 'Eeze.h',
7 'Eeze_Net.h',
8 'Eeze_Sensor.h',
9 'Eeze_Disk.h',
10 join_paths('..','..','bin','eeze','eeze_scanner','eeze_scanner.h')
11]
12
13eeze_src = [
14 'eeze_main.c',
15 'eeze_net.c',
16 'eeze_net_private.h',
17 'eeze_sensor.c',
18 'eeze_sensor_private.h',
19 'eeze_udev_find.c',
20 'eeze_udev_private.c',
21 'eeze_udev_private.h',
22 'eeze_udev_syspath.c',
23 'eeze_udev_walk.c',
24 'eeze_udev_watch.c',
25 'eeze_disk.c',
26 'eeze_disk_udev.c',
27 'eeze_disk_mount.c',
28 'eeze_disk_private.h'
29]
30
31if get_option('v4l2')
32 config_h.set('HAVE_V4L2', '1')
33 if cc.has_header('linux/videodev2.h') == false
34 error('v4l2 headers not found')
35 endif
36endif
37
38if (get_option('libmount'))
39 libmount = dependency('mount')
40 eeze_deps += [libmount]
41 if libmount.version() == '2.19'
42 eeze_src += 'eeze_disk_libmount.c'
43 elif libmount.version() < '2.19'
44 eeze_src += 'eeze_disk_libmount_old.c'
45 elif libmount.version() > '2.19'
46 eeze_src += 'eeze_disk_libmount_new.c'
47 endif
48 config_h.set('HAVE_EEZE_MOUNT', '1')
49else
50 eeze_src += 'eeze_disk_dummy.c'
51endif
52
53options_to_check = ['eject', 'mount', 'unmount']
54
55eeze_deps += dependency('libudev',
56 version: ['>=148']
57)
58
59foreach option : options_to_check
60 val = get_option(option+'-path')
61 if val == 'detect'
62 # i dont know why we call this unmount when the bin is called umount
63 if option == 'unmount'
64 _option = 'umount'
65 else
66 _option = option
67 endif
68 prog = find_program(_option, required: false)
69 if prog.found()
70 set_variable(option+'_bin', prog.path())
71 else
72 set_variable(option+'_bin', '')
73 endif
74 else
75 set_variable(option+'_bin', val)
76 endif
77endforeach
78
79config_h.set_quoted('EEZE_EJECT_BIN', eject_bin)
80config_h.set_quoted('EEZE_MOUNT_BIN', mount_bin)
81config_h.set_quoted('EEZE_UNMOUNT_BIN', unmount_bin)
82
83eeze_lib = library('eeze',
84 eeze_src, pub_eo_file_target,
85 dependencies: eeze_deps + eeze_pub_deps + [ecore, ecore_file, buildsystem, eeze_deps],
86 include_directories : config_dir,
87 install: true,
88 c_args : package_c_args,
89 version : meson.project_version()
90)
91
92eeze = declare_dependency(
93 include_directories: [include_directories('.')],
94 link_with: eeze_lib,
95 sources : pub_eo_file_target + priv_eo_file_target,
96 dependencies: eeze_pub_deps,
97)
98
99install_headers(eeze_header_src,
100 install_dir : dir_package_include,
101)