summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 16:24:58 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 16:03:45 -0400
commitf1fd2a827a80af214325abef48f6425965ab374a (patch)
tree5b901eaa516d95649482f14b91813c6da85d683f
parent39c65797de10433c3bf68f9199883e7b7a74b8cb (diff)
meson formatting
-rw-r--r--meson.build92
1 files changed, 46 insertions, 46 deletions
diff --git a/meson.build b/meson.build
index 25b888f..5c18b67 100644
--- a/meson.build
+++ b/meson.build
@@ -1,17 +1,17 @@
1project('desksanity', 'c', 1project('desksanity', 'c',
2 version : '1.1.99', 2 version: '1.1.99',
3 license : 'BSD 2 clause', 3 license: 'BSD 2 clause',
4 default_options: [ 'c_std=gnu99', 'warning_level=2' ], 4 default_options: [ 'c_std=gnu99', 'warning_level=2' ],
5 meson_version : '>= 0.40.0') 5 meson_version: '>= 0.40.0')
6 6
7add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c') 7add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c')
8dir_prefix = get_option('prefix') 8dir_prefix = get_option('prefix')
9dir_bin = join_paths(dir_prefix, get_option('bindir')) 9dir_bin = join_paths(dir_prefix, get_option('bindir'))
10dir_sysconf = get_option('sysconfdir') 10dir_sysconf = get_option('sysconfdir')
11dir_data = join_paths(dir_prefix, get_option('datadir')) 11dir_data = join_paths(dir_prefix, get_option('datadir'))
12dir_include = join_paths(dir_prefix, get_option('includedir')) 12dir_include = join_paths(dir_prefix, get_option('includedir'))
13dir_include_e = join_paths(dir_include, meson.project_name()) 13dir_include_e = join_paths(dir_include, meson.project_name())
14dir_lib = join_paths(dir_prefix, get_option('libdir')) 14dir_lib = join_paths(dir_prefix, get_option('libdir'))
15 15
16 16
17pkgconfig = import('pkgconfig') 17pkgconfig = import('pkgconfig')
@@ -20,36 +20,36 @@ cc = meson.get_compiler('c')
20# disable for release builds 20# disable for release builds
21dev_cflags = [] 21dev_cflags = []
22dev_cflags_try = [ 22dev_cflags_try = [
23 '-Wall', 23 '-Wall',
24 '-W', 24 '-W',
25 '-Wpointer-arith', 25 '-Wpointer-arith',
26 '-Wshadow', 26 '-Wshadow',
27 '-Wno-missing-field-initializers', 27 '-Wno-missing-field-initializers',
28 '-Wfloat-equal', 28 '-Wfloat-equal',
29 '-Wuninitialized', 29 '-Wuninitialized',
30 '-Wundef', 30 '-Wundef',
31 '-Wcast-align', 31 '-Wcast-align',
32 '-Wformat=2', 32 '-Wformat=2',
33 '-Wno-format-y2k', 33 '-Wno-format-y2k',
34] 34]
35 35
36foreach cf: dev_cflags_try 36foreach cf: dev_cflags_try
37 if cc.has_argument(cf) == true 37if cc.has_argument(cf) == true
38 dev_cflags += cf 38dev_cflags += cf
39 endif 39endif
40endforeach 40endforeach
41add_global_arguments(dev_cflags, language: 'c') 41add_global_arguments(dev_cflags, language: 'c')
42 42
43release = 'ver-0.22' 43release = 'ver-0.22'
44host_os = host_machine.system() 44host_os = host_machine.system()
45if host_os == 'linux' 45if host_os == 'linux'
46 if cc.has_header_symbol('features.h', '__UCLIBC__') 46 if cc.has_header_symbol('features.h', '__UCLIBC__')
47 host_os = 'linux-uclibc' 47 host_os = 'linux-uclibc'
48 elif cc.has_header_symbol('features.h', '__dietlibc__') 48 elif cc.has_header_symbol('features.h', '__dietlibc__')
49 host_os = 'linux-dietlibc' 49 host_os = 'linux-dietlibc'
50 else 50 else
51 host_os = 'linux-gnu' 51 host_os = 'linux-gnu'
52 endif 52 endif
53endif 53endif
54 54
55module_arch = '@0@-@1@-@2@'.format(host_os, host_machine.cpu_family(), release) 55module_arch = '@0@-@1@-@2@'.format(host_os, host_machine.cpu_family(), release)
@@ -70,38 +70,38 @@ config_h.set_quoted('BINDIR', dir_bin)
70config_h.set_quoted('DATADIR', dir_data) 70config_h.set_quoted('DATADIR', dir_data)
71 71
72if cc.has_function('setenv') == true 72if cc.has_function('setenv') == true
73 config_h.set('HAVE_SETENV', '1') 73 config_h.set('HAVE_SETENV', '1')
74endif 74endif
75if cc.has_function('unsetenv') == true 75if cc.has_function('unsetenv') == true
76 config_h.set('HAVE_UNSETENV', '1') 76 config_h.set('HAVE_UNSETENV', '1')
77endif 77endif
78if cc.has_function('clearenv') == true 78if cc.has_function('clearenv') == true
79 config_h.set('HAVE_CLEARENV', '1') 79 config_h.set('HAVE_CLEARENV', '1')
80endif 80endif
81if cc.has_header('features.h') == true 81if cc.has_header('features.h') == true
82 config_h.set('HAVE_FEATURES_H', '1') 82 config_h.set('HAVE_FEATURES_H', '1')
83endif 83endif
84if cc.has_header('sys/ptrace.h') == true 84if cc.has_header('sys/ptrace.h') == true
85 config_h.set('HAVE_SYS_PTRACE_H', '1') 85 config_h.set('HAVE_SYS_PTRACE_H', '1')
86endif 86endif
87if cc.has_header('arpa/inet.h') == true 87if cc.has_header('arpa/inet.h') == true
88 config_h.set('HAVE_ARPA_INET_H', '1') 88 config_h.set('HAVE_ARPA_INET_H', '1')
89endif 89endif
90if cc.has_header('netinet/in.h') == true 90if cc.has_header('netinet/in.h') == true
91 config_h.set('HAVE_NETINET_IN_H', '1') 91 config_h.set('HAVE_NETINET_IN_H', '1')
92endif 92endif
93if cc.has_header('execinfo.h') == true 93if cc.has_header('execinfo.h') == true
94 config_h.set('HAVE_EXECINFO_H', '1') 94 config_h.set('HAVE_EXECINFO_H', '1')
95elif cc.has_function('backtrace_symbols_fd', dependencies: 'execinfo') == false 95elif cc.has_function('backtrace_symbols_fd', dependencies: 'execinfo') == false
96 execinfo_dep = dependency('execinfo', required: false) 96 execinfo_dep = dependency('execinfo', required: false)
97endif 97endif
98 98
99if cc.has_header('fnmatch.h') == false 99if cc.has_header('fnmatch.h') == false
100 error('fnmatch.h not found') 100 error('fnmatch.h not found')
101endif 101endif
102 102
103if cc.has_function('fnmatch') == false 103if cc.has_function('fnmatch') == false
104 dep_fnmatch = dependency('fnmatch', required: true) 104 dep_fnmatch = dependency('fnmatch', required: true)
105endif 105endif
106 106
107add_global_arguments('-DPACKAGE_BIN_DIR="@0@"'.format(dir_bin), language: 'c') 107add_global_arguments('-DPACKAGE_BIN_DIR="@0@"'.format(dir_bin), language: 'c')
@@ -112,7 +112,7 @@ add_global_arguments('-DPACKAGE_SYSCONF_DIR="@0@"'.format(dir_sysconf), language
112dep_efl_wl = dependency('efl-wl', required: false) 112dep_efl_wl = dependency('efl-wl', required: false)
113dep_e = dependency('enlightenment') 113dep_e = dependency('enlightenment')
114 114
115dir_module_e = join_paths([dep_e.get_pkgconfig_variable('modules'), 'desksanity']) 115dir_module_e = join_paths([dep_e.get_pkgconfig_variable('modules'), 'desksanity'])
116edje_cc = find_program('edje_cc') 116edje_cc = find_program('edje_cc')
117 117
118install_data(['e-module-desksanity.edj', 'module.desktop'], 118install_data(['e-module-desksanity.edj', 'module.desktop'],
@@ -150,9 +150,9 @@ if dep_efl_wl.found() == true
150endif 150endif
151 151
152 152
153configure_file(output : 'config.h', 153configure_file(output: 'config.h',
154 install : false, 154 install: false,
155 configuration: config_h) 155 configuration: config_h)
156 156
157executable('e_gadget_test', 157executable('e_gadget_test',
158 'loader/test.c', 158 'loader/test.c',