1project('gpg-gui', 'vala', 'c', meson_version: '>=0.50') 2 3valac = meson.get_compiler('vala') 4 5# Application names in different styles 6reverse_dns = 'com.github.ansgarklein.gpggui' 7application_name = 'GPG-Gui' 8 9if get_option('GPG_GUI_RDNS_NAMING') 10 binary_name = reverse_dns 11else 12 binary_name = meson.project_name() 13endif 14 15# Source files for binary (will be defined later) 16sources = [] 17 18# Extra directories for header files 19include_dirs = [] 20 21# Dependencies of the main binary 22dependencies = [ 23 dependency('glib-2.0'), 24 dependency('gobject-2.0'), 25 dependency('gtk+-3.0'), 26 valac.find_library('posix'), 27] 28 29gettext_package = reverse_dns 30add_project_arguments('-DGETTEXT_PACKAGE=' + gettext_package, language: 'c') 31 32# Enable client-side decorations if desired 33if get_option('GPG_GUI_CSD') 34 add_project_arguments(['-D', 'GPG_GUI_CSD'], language: 'vala') 35endif 36 37subdir('scripts') 38subdir('src') 39subdir('data') 40subdir('include') 41subdir('vapi') 42 43# Print summary of build configuration 44if meson.version().version_compare('>=0.53') 45 summary({ 46 'prefix': get_option('prefix'), 47 'datadir': get_option('datadir'), 48 'bindir': get_option('bindir'), 49 }, section: 'Directories' 50 ) 51 52 summary({ 53 'buildtype': get_option('buildtype'), 54 'debug': get_option('debug'), 55 'optimization': get_option('optimization'), 56 'unity': get_option('unity'), 57 }, section: 'Build configuration' 58 ) 59 60 summary({ 61 'GPG_GUI_CSD': get_option('GPG_GUI_CSD'), 62 'GPG_GUI_RDNS_NAMING': get_option('GPG_GUI_CSD'), 63 'application verson': gpg_gui_version, 64 }, section: 'Application configuration' 65 ) 66else 67 message('Directories') 68 message('prefix: @0@'.format(get_option('prefix'))) 69 message('datadir: @0@'.format(get_option('datadir'))) 70 message('bindir: @0@'.format(get_option('bindir'))) 71 message('') 72 message('Build configuration') 73 message('buildtype: @0@'.format(get_option('buildtype'))) 74 message('debug: @0@'.format(get_option('debug'))) 75 message('optimization: @0@'.format(get_option('optimization'))) 76 message('unity: @0@'.format(get_option('unity'))) 77 message('') 78 message('Application configuration') 79 message('GPG_GUI_CSD: @0@'.format(get_option('GPG_GUI_CSD'))) 80 message('GPG_GUI_RDNS_NAMING: @0@'.format(get_option('GPG_GUI_RDNS_NAMING'))) 81 message('application version: @0@'.format(gpg_gui_version)) 82endif 83 84# Meson versions "0.52< version <0.56" will print warnings when using features 85# that were introduced in Meson versions older than the projects required Meson 86# version (specified in project() function) EVEN IF those features were wrapped 87# in a version comparison conditional and would not be used unless the installed 88# Meson version supported them. This is Meson bug #7590. 89# Remove this block once Meson 0.56 is a hard requirement (-> project()). 90if meson.version().version_compare('>0.53') and meson.version().version_compare('<0.56') 91 warning('Please ignore warnings about using features introduced in newer versions than this project is targeting.') 92 warning('Those messages are because of Meson bug #7590, which is fixed in Meson 0.56.') 93 warning('You can get rid of this message by using a newer version of Meson.') 94endif 95 96# Main target 97executable( 98 binary_name, 99 sources, 100 dependencies: dependencies, 101 include_directories: include_dirs, 102 install: true, 103) 104