2017-12-13 18:13:54 +00:00
|
|
|
project('nautilus', 'c',
|
2018-03-13 05:10:14 +00:00
|
|
|
version: '3.28.0',
|
2018-04-28 17:15:35 +00:00
|
|
|
meson_version: '>= 0.46.0',
|
2017-12-13 18:13:54 +00:00
|
|
|
license: 'GPL3+'
|
|
|
|
)
|
|
|
|
|
|
|
|
# Directory variables
|
|
|
|
bindir = get_option('bindir')
|
|
|
|
datadir = get_option('datadir')
|
|
|
|
desktopdir = join_paths(datadir, 'applications')
|
|
|
|
includedir = get_option('includedir')
|
|
|
|
libdir = get_option('libdir')
|
|
|
|
extensiondir = join_paths(libdir, 'nautilus', 'extensions-3.0')
|
|
|
|
prefix = get_option('prefix')
|
|
|
|
servicedir = join_paths(datadir, 'dbus-1', 'services')
|
|
|
|
#
|
|
|
|
|
|
|
|
# Compiler variables
|
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
#
|
|
|
|
|
2018-02-26 07:47:59 +00:00
|
|
|
add_project_arguments(
|
|
|
|
cc.get_supported_arguments([
|
|
|
|
'-Wall',
|
|
|
|
'-Wduplicated-branches',
|
|
|
|
'-Wlogical-op',
|
|
|
|
'-Werror=declaration-after-statement',
|
|
|
|
'-Werror=empty-body',
|
|
|
|
'-Werror=format=2',
|
|
|
|
'-Werror=implicit-function-declaration',
|
|
|
|
'-Werror=init-self',
|
|
|
|
'-Werror=missing-include-dirs',
|
|
|
|
'-Werror=missing-prototypes',
|
|
|
|
'-Werror=pointer-arith',
|
|
|
|
'-Werror=sequence-point',
|
|
|
|
'-Werror=shadow',
|
|
|
|
'-Werror=strict-prototypes',
|
|
|
|
'-Werror=undef',
|
|
|
|
'-Werror=uninitialized',
|
|
|
|
]),
|
|
|
|
language: 'c'
|
|
|
|
)
|
|
|
|
|
2017-12-13 18:13:54 +00:00
|
|
|
# Imports
|
|
|
|
gnome = import('gnome')
|
|
|
|
i18n = import('i18n')
|
2018-01-30 18:30:10 +00:00
|
|
|
pkgconfig = import('pkgconfig')
|
2017-12-13 18:13:54 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# Dependencies
|
2018-02-20 22:14:45 +00:00
|
|
|
glib_ver = '>= 2.55.1'
|
2017-12-13 18:13:54 +00:00
|
|
|
|
|
|
|
libgd = subproject(
|
|
|
|
'libgd',
|
|
|
|
default_options: [
|
|
|
|
'static=true',
|
|
|
|
'with-gtk-hacks=true',
|
|
|
|
'with-main-view=true',
|
|
|
|
'with-tagged-entry=true'
|
|
|
|
]
|
|
|
|
)
|
|
|
|
libgd_dep = libgd.get_variable('libgd_dep')
|
|
|
|
|
2018-03-24 12:08:57 +00:00
|
|
|
libm = cc.find_library('m')
|
2017-12-13 18:13:54 +00:00
|
|
|
|
2018-01-31 08:27:52 +00:00
|
|
|
if get_option('extensions')
|
|
|
|
gexiv = dependency('gexiv2', version: '>= 0.10.0')
|
|
|
|
endif
|
2017-12-13 18:13:54 +00:00
|
|
|
gio = dependency('gio-2.0', version: glib_ver)
|
|
|
|
gio_unix = dependency('gio-unix-2.0', version: glib_ver)
|
|
|
|
glib = dependency('glib-2.0', version: glib_ver)
|
|
|
|
gmodule = dependency('gmodule-no-export-2.0', version: glib_ver)
|
|
|
|
gnome_autoar = dependency('gnome-autoar-0', version: '>= 0.2.1')
|
2018-04-28 10:21:50 +00:00
|
|
|
gsettings_desktop_schemas = dependency('gsettings-desktop-schemas')
|
2018-03-20 19:02:49 +00:00
|
|
|
gtk = dependency('gtk+-3.0', version: '>= 3.22.27')
|
2018-04-28 10:21:50 +00:00
|
|
|
seccomp = dependency('libseccomp')
|
2018-01-04 15:27:13 +00:00
|
|
|
selinux = []
|
2017-12-13 18:13:54 +00:00
|
|
|
if get_option('selinux')
|
|
|
|
selinux = dependency('libselinux', version: '>= 2.0')
|
2016-09-28 06:16:11 +00:00
|
|
|
endif
|
2018-01-03 18:16:50 +00:00
|
|
|
tracker_sparql = dependency('tracker-sparql-2.0')
|
2017-12-13 18:13:54 +00:00
|
|
|
x11 = dependency('x11')
|
|
|
|
xml = dependency('libxml-2.0', version: '>= 2.7.8')
|
|
|
|
#
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
conf = configuration_data()
|
|
|
|
|
2018-03-16 15:24:11 +00:00
|
|
|
if get_option('profile') == 'development'
|
|
|
|
profile = 'Devel'
|
2018-03-19 11:08:49 +00:00
|
|
|
name_suffix = ' (Development Snapshot)'
|
|
|
|
elif get_option('profile') == 'stable-flatpak'
|
|
|
|
profile = 'StableFlatpak'
|
2018-03-19 12:11:20 +00:00
|
|
|
version_array = meson.project_version().split('.')
|
|
|
|
name_suffix = ' (@0@.@1@ Flatpak)'.format(version_array[0], version_array[1])
|
2018-03-16 15:24:11 +00:00
|
|
|
else
|
2018-03-19 11:08:49 +00:00
|
|
|
profile = ''
|
|
|
|
name_suffix = ''
|
2018-03-16 15:24:11 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
application_id = 'org.gnome.Nautilus@0@'.format(profile)
|
|
|
|
|
2018-03-19 11:08:49 +00:00
|
|
|
conf.set_quoted('VERSION', '@0@-@VCS_TAG@'.format(meson.project_version()))
|
2017-12-13 18:13:54 +00:00
|
|
|
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
|
|
|
conf.set_quoted('GETTEXT_PACKAGE', 'nautilus')
|
|
|
|
conf.set_quoted('LOCALEDIR', join_paths(prefix, get_option('localedir')))
|
|
|
|
conf.set_quoted('NAUTILUS_DATADIR', join_paths(datadir, 'nautilus'))
|
|
|
|
conf.set_quoted('NAUTILUS_EXTENSIONDIR', join_paths(prefix, extensiondir))
|
2018-03-16 15:24:11 +00:00
|
|
|
conf.set_quoted('APPLICATION_ID', application_id)
|
2018-04-28 10:21:50 +00:00
|
|
|
conf.set_quoted('INSTALL_PREFIX', prefix)
|
2018-03-16 15:24:11 +00:00
|
|
|
conf.set_quoted('PROFILE', profile)
|
2018-03-19 11:08:49 +00:00
|
|
|
conf.set_quoted('NAME_SUFFIX', name_suffix)
|
2017-12-13 18:13:54 +00:00
|
|
|
|
2018-04-28 10:21:50 +00:00
|
|
|
|
|
|
|
# _ _ _
|
|
|
|
# __ _ _ __ ___ _ __ ___ ___ __| | ___ ___| | _| |_ ___ _ __
|
|
|
|
# / _` | '_ \ / _ \| '_ ` _ \ / _ \_____ / _` |/ _ \/ __| |/ / __/ _ \| '_ \
|
|
|
|
#| (_| | | | | (_) | | | | | | __/_____| (_| | __/\__ \ <| || (_) | |_) |
|
|
|
|
# \__, |_| |_|\___/|_| |_| |_|\___| \__,_|\___||___/_|\_\\__\___/| .__/
|
|
|
|
# |___/ |_|
|
|
|
|
#
|
|
|
|
# gnome-desktop macros for thumbnailer sandboxing.
|
|
|
|
####################################
|
|
|
|
conf.set10('_GNU_SOURCE', true) # `man user_namespaces` /CLONE_NEWUSER
|
|
|
|
conf.set10('ENABLE_SECCOMP', true) #
|
|
|
|
conf.set10('HAVE_BWRAP', true) #
|
|
|
|
####################################
|
|
|
|
|
2017-12-13 18:13:54 +00:00
|
|
|
if get_option('packagekit')
|
|
|
|
conf.set10('ENABLE_PACKAGEKIT', true)
|
|
|
|
endif
|
|
|
|
if get_option('profiling')
|
|
|
|
conf.set10('ENABLE_PROFILING', true)
|
|
|
|
endif
|
|
|
|
if get_option('selinux')
|
|
|
|
conf.set10('HAVE_SELINUX', true)
|
2016-09-28 06:16:11 +00:00
|
|
|
endif
|
|
|
|
|
2018-03-19 11:08:49 +00:00
|
|
|
config_h = declare_dependency(
|
|
|
|
sources: vcs_tag(
|
|
|
|
command: ['git', 'rev-parse', '--short', 'HEAD'],
|
|
|
|
fallback: get_option('profile') != 'default'? 'devel' : 'stable',
|
|
|
|
input: configure_file(
|
|
|
|
output: 'config.h.in',
|
|
|
|
configuration: conf
|
|
|
|
),
|
|
|
|
output: 'config.h'
|
2018-03-16 15:24:11 +00:00
|
|
|
)
|
2018-03-19 11:08:49 +00:00
|
|
|
)
|
2017-12-13 18:13:54 +00:00
|
|
|
#
|
2016-09-28 06:16:11 +00:00
|
|
|
|
2018-01-31 08:24:07 +00:00
|
|
|
nautilus_include_dirs = include_directories(
|
|
|
|
'.',
|
|
|
|
'libnautilus-extension'
|
|
|
|
)
|
2016-09-28 06:16:11 +00:00
|
|
|
|
2017-12-13 18:13:54 +00:00
|
|
|
subdir('eel')
|
|
|
|
subdir('libnautilus-extension')
|
2017-03-01 16:08:50 +00:00
|
|
|
|
2017-12-13 18:13:54 +00:00
|
|
|
subdir('src')
|
2018-03-15 20:44:56 +00:00
|
|
|
if get_option('tests') != 'none'
|
|
|
|
subdir('test')
|
|
|
|
endif
|
2017-12-13 18:13:54 +00:00
|
|
|
subdir('data')
|
|
|
|
subdir('po')
|
|
|
|
if get_option('docs')
|
|
|
|
subdir('docs')
|
2017-03-01 16:08:50 +00:00
|
|
|
endif
|
2018-01-31 08:27:52 +00:00
|
|
|
if get_option('extensions')
|
|
|
|
subdir('extensions')
|
2016-09-28 06:16:11 +00:00
|
|
|
endif
|
2017-03-07 09:24:54 +00:00
|
|
|
|
|
|
|
# Compile GSettings schemas when installing from source.
|
2017-12-13 18:13:54 +00:00
|
|
|
meson.add_install_script('build-aux/meson/postinstall.py')
|