summaryrefslogtreecommitdiff
path: root/src/lib/ecore_x
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/ecore_x
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/ecore_x')
-rw-r--r--src/lib/ecore_x/meson.build142
1 files changed, 142 insertions, 0 deletions
diff --git a/src/lib/ecore_x/meson.build b/src/lib/ecore_x/meson.build
new file mode 100644
index 0000000..9c1f00d
--- /dev/null
+++ b/src/lib/ecore_x/meson.build
@@ -0,0 +1,142 @@
1ecore_x_deps = [ecore, dl, m, ecore_input]
2ecore_x_pub_deps = [eina, efl]
3
4ecore_x_header_src = [
5 'Ecore_X.h',
6 'Ecore_X_Atoms.h',
7 'Ecore_X_Cursor.h'
8]
9
10ecore_x_src = [
11 'ecore_x_atoms_decl.h',
12 'ecore_x.c',
13 'ecore_x_dnd.c',
14 'ecore_x_sync.c',
15 'ecore_x_randr.c',
16 'ecore_x_fixes.c',
17 'ecore_x_damage.c',
18 'ecore_x_composite.c',
19 'ecore_x_error.c',
20 'ecore_x_events.c',
21 'ecore_x_icccm.c',
22 'ecore_x_keygrab.c',
23 'ecore_x_netwm.c',
24 'ecore_x_mwm.c',
25 'ecore_x_e.c',
26 'ecore_x_selection.c',
27 'ecore_x_window.c',
28 'ecore_x_window_prop.c',
29 'ecore_x_window_shape.c',
30 'ecore_x_pixmap.c',
31 'ecore_x_present.c',
32 'ecore_x_gc.c',
33 'ecore_x_xinerama.c',
34 'ecore_x_screensaver.c',
35 'ecore_x_dpms.c',
36 'ecore_x_drawable.c',
37 'ecore_x_cursor.c',
38 'ecore_x_test.c',
39 'ecore_x_atoms.c',
40 'ecore_x_region.c',
41 'ecore_x_image.c',
42 'ecore_x_xi2.c',
43 'ecore_x_vsync.c',
44 'ecore_x_gesture.c',
45 'ecore_x_private.h'
46]
47
48ecore_x_checks = [
49 ['Xcomposite', 'Xcomposite.h', 'Xcomposite', 'XCompositeQueryExtension'],
50 ['Xdamage', 'Xdamage.h', 'Xdamage', 'XDamageSubtract'],
51 ['Xdpms', 'dpms.h', 'Xext', 'DPMSQueryExtension'],
52 ['Xfixes', 'Xfixes.h', 'Xfixes', 'XFixesExpandRegion'],
53 ['Xinerama', 'Xinerama.h', 'Xinerama', 'XineramaQueryScreens'],
54 ['Xrandr', 'Xrandr.h', 'Xrandr', 'XRRGetScreenResourcesCurrent'],
55 ['Xrender', 'Xrender.h', 'Xrender', 'XRenderFindVisualFormat'],
56 ['Xtest', 'XTest.h', 'Xtst', 'XTestFakeKeyEvent'],
57 ['Xss', 'scrnsaver.h', 'Xss', 'XScreenSaverSelectInput'],
58]
59
60if get_option('xpresent')
61 ecore_x_checks += [['Xpresent', 'Xpresent.h', 'Xpresent', 'XPresentQueryExtension']]
62endif
63
64if get_option('xgesture')
65 ecore_x_checks += [['Xgesture', 'gesture.h', 'Xgesture', 'XGestureQueryExtension']]
66endif
67
68if get_option('xinput2')
69 ecore_x_checks += [['Xi2', 'XInput2.h', 'Xi', 'XIQueryDevice']]
70endif
71
72if get_option('xinput22')
73 ecore_x_checks += [['Xi2_2', 'XInput2.h', 'Xi','XIGrabTouchBegin']]
74endif
75
76x11 = dependency('x11', required: false)
77if x11.found() == false
78 x11 = cc.find_library('x11', required: true)
79endif
80
81xcb = dependency('xcb', required: false)
82if xcb.found() == false
83 xcb = cc.find_library('xcb', required: true)
84endif
85
86x11_xcb = dependency('x11-xcb', required: false)
87if x11_xcb.found() == false
88 x11_xcb = cc.find_library('x11-xcb', required: true)
89endif
90
91foreach ecore_x_check : ecore_x_checks
92 x_lib = cc.find_library(ecore_x_check[2],
93 required: false
94 )
95
96 if cc.compiles('''
97#include <X11/Xlib.h>
98#include <X11/extensions/'''+ecore_x_check[1]+'''>
99int main () {
100 #ifndef '''+ecore_x_check[3]+'''
101 '''+ecore_x_check[3]+''';
102 #endif
103}
104 ''',
105 dependencies : [x_lib, x11]
106 ) == true
107 config_h.set('ECORE_'+ecore_x_check[0].to_upper(), '1')
108 else
109 error('extension '+ecore_x_check[0]+' not found for X11')
110 endif
111 ecore_x_deps += x_lib
112endforeach
113
114ecore_x_deps += x11
115ecore_x_deps += xcb
116ecore_x_deps += x11_xcb
117
118
119# there are a few special cases
120cc.has_header_symbol('X11/XKBlib.h', 'XkbSetDetectableAutoRepeat',
121 dependencies : [x11, xcb]
122)
123config_h.set('ECORE_XKB', '1')
124
125ecore_x_lib = library('ecore_x',
126 ecore_x_src, pub_eo_file_target,
127 dependencies: ecore_x_pub_deps + ecore_x_deps,
128 include_directories : config_dir,
129 install: true,
130 version : meson.project_version()
131)
132
133ecore_x = declare_dependency(
134 include_directories: [include_directories('.')],
135 link_with: ecore_x_lib,
136 sources : pub_eo_file_target + priv_eo_file_target,
137 dependencies: ecore_x_pub_deps,
138)
139
140install_headers(ecore_x_header_src,
141 install_dir : dir_package_include,
142)