| 1 |
project('connman-gtk', 'c', |
| 2 |
version : '1.1.1', |
| 3 |
license: [ |
| 4 |
'GPL-2.0', |
| 5 |
], |
| 6 |
default_options: [ |
| 7 |
'c_std=c11', |
| 8 |
]) |
| 9 |
|
| 10 |
|
| 11 |
am_cflags = [ |
| 12 |
'-fstack-protector', |
| 13 |
'-pedantic', |
| 14 |
'-Wstrict-prototypes', |
| 15 |
'-Wundef', |
| 16 |
'-Werror-implicit-function-declaration', |
| 17 |
'-Wformat', |
| 18 |
'-Wformat-security', |
| 19 |
'-Werror=format-security', |
| 20 |
'-Wconversion', |
| 21 |
'-Wno-unused-parameter', |
| 22 |
'-Wunreachable-code', |
| 23 |
'-Wall', |
| 24 |
'-W', |
| 25 |
] |
| 26 |
add_global_arguments(am_cflags, language: 'c') |
| 27 |
|
| 28 |
gtk = dependency('gtk+-3.0', version: '>=3.22') |
| 29 |
glib = dependency('glib-2.0', version: '>=2.50') |
| 30 |
|
| 31 |
i18n = import('i18n') |
| 32 |
|
| 33 |
conf_data = configuration_data() |
| 34 |
openconnect = disabler() |
| 35 |
cc = meson.get_compiler('c') |
| 36 |
dl = cc.find_library('dl', required: false) |
| 37 |
|
| 38 |
use_openconnect = get_option('use_openconnect') |
| 39 |
if(use_openconnect == 'yes') |
| 40 |
openconnect = dependency('openconnect', version: '>=5.99') |
| 41 |
endif |
| 42 |
if(use_openconnect == 'dynamic' and dl.found()) |
| 43 |
openconnect = dependency('openconnect', version: '>=5.99') |
| 44 |
conf_data.set('USE_OPENCONNECT_DYNAMIC', true) |
| 45 |
endif |
| 46 |
if (use_openconnect == 'check') |
| 47 |
openconnect = dependency('openconnect', version: '>=5.99', required : false) |
| 48 |
endif |
| 49 |
|
| 50 |
conf_data.set('USE_OPENCONNECT', openconnect.found()) |
| 51 |
conf_data.set('USE_STATUS_ICON', get_option('use_status_icon')) |
| 52 |
conf_data.set_quoted('GETTEXT_PACKAGE', meson.project_name()) |
| 53 |
conf_data.set_quoted('CONNMAN_GTK_LOCALEDIR', get_option('prefix') + '/' + get_option('localedir') + '/') |
| 54 |
|
| 55 |
conf_data.set('version', meson.project_version()) |
| 56 |
configure_file(input : 'config.h.in', |
| 57 |
output : 'config.h', |
| 58 |
configuration : conf_data) |
| 59 |
|
| 60 |
extra_includes = [ |
| 61 |
include_directories('.'), |
| 62 |
] |
| 63 |
|
| 64 |
readmes = [ |
| 65 |
'CHANGELOG.md', |
| 66 |
'README.md' |
| 67 |
] |
| 68 |
|
| 69 |
|
| 70 |
# install_data(readmes, install_dir : join_paths(get_option('datadir'), meson.project_name(), 'doc')) |
| 71 |
subdir('po') |
| 72 |
subdir('src') |
| 73 |
subdir('data') |
| 74 |
|