2017-12-13 18:13:54 +00:00
|
|
|
|
project('nautilus', 'c',
|
2018-06-09 15:53:27 +00:00
|
|
|
|
default_options: ['c_std=c11'],
|
2020-07-02 11:34:37 +00:00
|
|
|
|
|
|
|
|
|
# Do not forget when releasing:
|
|
|
|
|
# * Update version in data/org.gnome.Nautilus.appdata.xml.in.in
|
2023-09-02 18:00:25 +00:00
|
|
|
|
version: '46.alpha.0',
|
2020-07-02 11:34:37 +00:00
|
|
|
|
|
2022-02-18 16:03:14 +00:00
|
|
|
|
meson_version: '>= 0.59.0',
|
2022-02-28 18:42:00 +00:00
|
|
|
|
license: 'GPL-3.0-or-later'
|
2017-12-13 18:13:54 +00:00
|
|
|
|
)
|
|
|
|
|
|
2022-08-07 14:08:06 +00:00
|
|
|
|
nautilus_extension_version = '4'
|
|
|
|
|
|
2018-07-14 10:35:24 +00:00
|
|
|
|
###############
|
|
|
|
|
# Directories #
|
|
|
|
|
###############
|
|
|
|
|
|
|
|
|
|
prefix = get_option('prefix')
|
|
|
|
|
|
2017-12-13 18:13:54 +00:00
|
|
|
|
bindir = get_option('bindir')
|
|
|
|
|
datadir = get_option('datadir')
|
|
|
|
|
desktopdir = join_paths(datadir, 'applications')
|
|
|
|
|
includedir = get_option('includedir')
|
|
|
|
|
libdir = get_option('libdir')
|
2018-07-14 10:35:24 +00:00
|
|
|
|
localedir = get_option('localedir')
|
2022-08-10 19:15:44 +00:00
|
|
|
|
docdir = datadir / 'doc'
|
2022-08-07 14:08:06 +00:00
|
|
|
|
extensiondir = join_paths(libdir, 'nautilus', 'extensions-' + nautilus_extension_version)
|
2017-12-13 18:13:54 +00:00
|
|
|
|
servicedir = join_paths(datadir, 'dbus-1', 'services')
|
|
|
|
|
|
2018-07-14 10:35:24 +00:00
|
|
|
|
###################
|
|
|
|
|
# End directories #
|
|
|
|
|
###################
|
|
|
|
|
|
|
|
|
|
#############
|
|
|
|
|
# Compilers #
|
|
|
|
|
#############
|
|
|
|
|
|
2017-12-13 18:13:54 +00:00
|
|
|
|
cc = meson.get_compiler('c')
|
2018-07-14 10:35:24 +00:00
|
|
|
|
|
|
|
|
|
#################
|
|
|
|
|
# End compilers #
|
|
|
|
|
#################
|
2017-12-13 18:13:54 +00:00
|
|
|
|
|
2018-02-26 07:47:59 +00:00
|
|
|
|
add_project_arguments(
|
|
|
|
|
cc.get_supported_arguments([
|
|
|
|
|
'-Wall',
|
|
|
|
|
'-Wduplicated-branches',
|
2018-05-28 09:59:33 +00:00
|
|
|
|
'-Wduplicated-cond',
|
2018-02-26 07:47:59 +00:00
|
|
|
|
'-Wlogical-op',
|
|
|
|
|
'-Werror=declaration-after-statement',
|
|
|
|
|
'-Werror=empty-body',
|
|
|
|
|
'-Werror=format=2',
|
|
|
|
|
'-Werror=implicit-function-declaration',
|
2018-10-06 16:19:28 +00:00
|
|
|
|
'-Werror=incompatible-pointer-types',
|
2018-02-26 07:47:59 +00:00
|
|
|
|
'-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',
|
2023-07-31 11:23:19 +00:00
|
|
|
|
# There are currently too many warnings caused by deprecations, hindering the usefulness
|
|
|
|
|
# of any other warnings. Disable them until
|
|
|
|
|
# https://gitlab.gnome.org/GNOME/nautilus/-/issues/2722 is resolved.
|
|
|
|
|
'-Wno-deprecated-declarations',
|
2018-10-31 20:47:59 +00:00
|
|
|
|
# Context: https://gitlab.com/freedesktop-sdk/freedesktop-sdk/commit/ce54a2527555e51e4ebf4cce9cbb6259cafa89a4
|
|
|
|
|
# -O2 and -fexceptions unmask some cases of -Wmaybe-uninitialized, which
|
|
|
|
|
# become errors for some reason (I’m guessing because of the
|
|
|
|
|
# -Werror=uninitialized above, but no idea why that implies this).
|
|
|
|
|
# This being an error is nice and all, but not when its appearance is
|
|
|
|
|
# dependent on optimization level and other flags.
|
|
|
|
|
'-Wno-error=maybe-uninitialized',
|
2018-02-26 07:47:59 +00:00
|
|
|
|
]),
|
2018-06-09 15:58:46 +00:00
|
|
|
|
'-D_GNU_SOURCE',
|
2018-02-26 07:47:59 +00:00
|
|
|
|
language: 'c'
|
|
|
|
|
)
|
|
|
|
|
|
2018-07-14 10:35:24 +00:00
|
|
|
|
##################
|
|
|
|
|
# Module imports #
|
|
|
|
|
##################
|
|
|
|
|
|
2017-12-13 18:13:54 +00:00
|
|
|
|
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
|
|
|
|
|
2018-07-14 10:35:24 +00:00
|
|
|
|
######################
|
|
|
|
|
# End module imports #
|
|
|
|
|
######################
|
|
|
|
|
|
|
|
|
|
################
|
|
|
|
|
# Dependencies #
|
|
|
|
|
################
|
2023-05-10 22:57:45 +00:00
|
|
|
|
glib_ver = '>= 2.77.0'
|
2017-12-13 18:13:54 +00:00
|
|
|
|
|
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')
|
2023-09-11 10:27:13 +00:00
|
|
|
|
gexiv = dependency('gexiv2', version: '>= 0.14.2')
|
2022-08-06 18:13:41 +00:00
|
|
|
|
gdkpixbuf = dependency('gdk-pixbuf-2.0', version: '>= 2.30.0')
|
2019-02-11 12:17:35 +00:00
|
|
|
|
gst_tag_dep = dependency('gstreamer-tag-1.0')
|
|
|
|
|
gst_pbutils_dep = dependency('gstreamer-pbutils-1.0')
|
2018-01-31 08:27:52 +00:00
|
|
|
|
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)
|
2023-03-14 09:32:48 +00:00
|
|
|
|
gnome_autoar = dependency('gnome-autoar-0', version: '>= 0.4.4')
|
2022-04-11 20:31:12 +00:00
|
|
|
|
gnome_desktop = dependency('gnome-desktop-4', version: '>= 43')
|
2023-04-07 22:56:10 +00:00
|
|
|
|
gtk = dependency('gtk4', version: '>= 4.11.2')
|
2023-04-18 22:36:39 +00:00
|
|
|
|
libadwaita = dependency('libadwaita-1', version: '>= 1.4.alpha')
|
2022-05-26 19:19:04 +00:00
|
|
|
|
libportal = dependency('libportal', version: '>= 0.5')
|
|
|
|
|
libportal_gtk4 = dependency('libportal-gtk4', version: '>= 0.5')
|
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
|
2020-05-02 14:46:28 +00:00
|
|
|
|
tracker_sparql = dependency('tracker-sparql-3.0')
|
2017-12-13 18:13:54 +00:00
|
|
|
|
xml = dependency('libxml-2.0', version: '>= 2.7.8')
|
2023-06-22 08:03:07 +00:00
|
|
|
|
cloudproviders = []
|
|
|
|
|
if get_option('cloudproviders')
|
|
|
|
|
cloudproviders = dependency('cloudproviders', version: '>= 0.3.1')
|
|
|
|
|
endif
|
2022-08-10 19:15:44 +00:00
|
|
|
|
gi_docgen = find_program('gi-docgen', required: get_option('docs'))
|
2017-12-13 18:13:54 +00:00
|
|
|
|
|
2018-07-14 10:35:24 +00:00
|
|
|
|
####################
|
|
|
|
|
# End dependencies #
|
|
|
|
|
####################
|
|
|
|
|
|
|
|
|
|
#################
|
|
|
|
|
# Configuration #
|
|
|
|
|
#################
|
2017-12-13 18:13:54 +00:00
|
|
|
|
conf = configuration_data()
|
|
|
|
|
|
2018-12-10 14:20:46 +00:00
|
|
|
|
profile = get_option('profile')
|
|
|
|
|
name_suffix = ''
|
|
|
|
|
|
2018-12-10 14:15:48 +00:00
|
|
|
|
if get_option('profile') == 'Devel'
|
2018-03-19 11:08:49 +00:00
|
|
|
|
name_suffix = ' (Development Snapshot)'
|
2018-03-16 15:24:11 +00:00
|
|
|
|
endif
|
|
|
|
|
|
2018-07-14 11:56:57 +00:00
|
|
|
|
application_id = 'org.gnome.Nautilus' + profile
|
2018-03-16 15:24:11 +00:00
|
|
|
|
|
2021-01-05 01:01:54 +00:00
|
|
|
|
if profile == ''
|
|
|
|
|
# Example: 40.0
|
|
|
|
|
version_string = meson.project_version()
|
|
|
|
|
else
|
|
|
|
|
# Examples: 40.alpha-787a835f
|
|
|
|
|
version_string = '@0@-@VCS_TAG@'.format(meson.project_version())
|
|
|
|
|
endif
|
|
|
|
|
|
2018-07-14 11:56:57 +00:00
|
|
|
|
conf.set_quoted('APPLICATION_ID', application_id)
|
2017-12-13 18:13:54 +00:00
|
|
|
|
conf.set_quoted('GETTEXT_PACKAGE', 'nautilus')
|
2018-07-14 10:35:24 +00:00
|
|
|
|
conf.set_quoted('LOCALEDIR', join_paths(prefix, localedir))
|
|
|
|
|
conf.set_quoted('NAME_SUFFIX', name_suffix)
|
2020-05-03 08:25:41 +00:00
|
|
|
|
conf.set_quoted('NAUTILUS_DATADIR', join_paths(prefix, datadir, 'nautilus'))
|
2017-12-13 18:13:54 +00:00
|
|
|
|
conf.set_quoted('NAUTILUS_EXTENSIONDIR', join_paths(prefix, extensiondir))
|
2018-07-14 10:35:24 +00:00
|
|
|
|
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
2018-03-16 15:24:11 +00:00
|
|
|
|
conf.set_quoted('PROFILE', profile)
|
2021-01-05 01:01:54 +00:00
|
|
|
|
conf.set_quoted('VERSION', version_string)
|
2018-04-28 10:21:50 +00:00
|
|
|
|
|
2018-10-08 11:15:39 +00:00
|
|
|
|
conf.set('ENABLE_PACKAGEKIT', get_option('packagekit'))
|
|
|
|
|
conf.set('ENABLE_PROFILING', get_option('profiling'))
|
|
|
|
|
conf.set('HAVE_SELINUX', get_option('selinux'))
|
2023-06-22 08:03:07 +00:00
|
|
|
|
conf.set('HAVE_CLOUDPROVIDERS', get_option('cloudproviders'))
|
2016-09-28 06:16:11 +00:00
|
|
|
|
|
2018-07-14 10:35:24 +00:00
|
|
|
|
#############################################################
|
|
|
|
|
# config.h dependency, add to target dependencies if needed #
|
|
|
|
|
#############################################################
|
|
|
|
|
|
2018-03-19 11:08:49 +00:00
|
|
|
|
config_h = declare_dependency(
|
|
|
|
|
sources: vcs_tag(
|
|
|
|
|
command: ['git', 'rev-parse', '--short', 'HEAD'],
|
2021-01-05 01:01:54 +00:00
|
|
|
|
fallback: profile != '' ? 'devel' : '',
|
2018-03-19 11:08:49 +00:00
|
|
|
|
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
|
|
|
|
)
|
2018-07-14 10:35:24 +00:00
|
|
|
|
|
|
|
|
|
#####################
|
|
|
|
|
# End configuration #
|
|
|
|
|
#####################
|
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
|
|
|
|
|
2018-07-14 10:35:24 +00:00
|
|
|
|
#########
|
|
|
|
|
# Build #
|
|
|
|
|
#########
|
|
|
|
|
|
|
|
|
|
subdirs = [
|
|
|
|
|
'data',
|
|
|
|
|
'eel',
|
|
|
|
|
'libnautilus-extension',
|
|
|
|
|
'po',
|
|
|
|
|
'src',
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
########################
|
|
|
|
|
# Conditional building #
|
|
|
|
|
########################
|
2017-03-01 16:08:50 +00:00
|
|
|
|
|
2023-01-09 20:12:32 +00:00
|
|
|
|
if get_option('docs')
|
2018-07-14 10:35:24 +00:00
|
|
|
|
subdirs += 'docs'
|
|
|
|
|
endif
|
|
|
|
|
if get_option('tests') != 'none'
|
|
|
|
|
subdirs += 'test'
|
2017-03-01 16:08:50 +00:00
|
|
|
|
endif
|
2018-01-31 08:27:52 +00:00
|
|
|
|
if get_option('extensions')
|
2018-07-14 10:35:24 +00:00
|
|
|
|
subdirs += 'extensions'
|
2016-09-28 06:16:11 +00:00
|
|
|
|
endif
|
2017-03-07 09:24:54 +00:00
|
|
|
|
|
2018-07-14 10:35:24 +00:00
|
|
|
|
foreach dir : subdirs
|
|
|
|
|
subdir(dir)
|
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
|
|
#############
|
|
|
|
|
# End build #
|
|
|
|
|
#############
|
|
|
|
|
|
2022-02-18 16:03:38 +00:00
|
|
|
|
gnome.post_install(
|
|
|
|
|
gtk_update_icon_cache: true,
|
|
|
|
|
glib_compile_schemas: true,
|
|
|
|
|
update_desktop_database: true,
|
|
|
|
|
)
|