1
0
mirror of https://gitlab.gnome.org/GNOME/evince synced 2024-07-05 00:59:07 +00:00
evince/shell/meson.build
Pablo Correa Gómez fcded848ec ev-sidebar-annotations: Use composite template
This simplifies the GTK4 move. Now, instead of recreating the
models when the document changes from having to not having annotations,
simply store those models and change between them.

Coauthored-by: default avatarQiu Wenbo <qiuwenbo@kylinos.com.cn>
2023-03-22 14:59:10 +00:00

162 lines
3.4 KiB
Meson

evince_sources = files(
'ev-annotation-properties-dialog.c',
'ev-annotations-toolbar.c',
'ev-application.c',
'ev-bookmarks.c',
'ev-file-monitor.c',
'ev-find-sidebar.c',
'ev-history.c',
'ev-keyring.c',
'ev-loading-message.c',
'ev-message-area.c',
'ev-metadata.c',
'ev-password-view.c',
'ev-progress-message-area.c',
'ev-properties-dialog.c',
'ev-properties-fonts.c',
'ev-properties-license.c',
'ev-recent-view.c',
'ev-toolbar.c',
'ev-utils.c',
'ev-window.c',
'ev-window-title.c',
'ev-sidebar-annotations.c',
'ev-sidebar-attachments.c',
'ev-sidebar-bookmarks.c',
'ev-sidebar.c',
'ev-sidebar-layers.c',
'ev-sidebar-links.c',
'ev-sidebar-page.c',
'ev-sidebar-thumbnails.c',
'ev-zoom-action.c',
'main.c',
)
resource_data = files(
'evince.css',
'../data/thumbnail-frame.png',
'evince-menus.ui',
'evince-message-area.ui',
'evince-password-view.ui',
'evince-properties-fonts.ui',
'evince-progress-message-area.ui',
'evince-recent-view.ui',
'evince-sidebar.ui',
'evince-sidebar-annotations.ui',
'evince-sidebar-bookmarks.ui',
'evince-toolbar.ui',
'evince-zoom-action.ui',
'help-overlay.ui',
)
evince_sources += gnome.compile_resources(
'ev-resources',
'evince.gresource.xml',
source_dir: data_dir,
c_name: ev_code_prefix.to_lower(),
dependencies: resource_data,
)
evince_deps = [
gdk_pixbuf_dep,
gnome_desktop_dep,
hdy_dep,
libevmisc_dep,
libevdocument_dep,
libevview_dep,
libevproperties_dep,
libdazzle_dep,
libgd_dep,
libgimpcellrenderertoggle_dep,
m_dep,
]
evince_cflags = [
'-DBINDIR="@0@"'.format(ev_bindir),
'-DGNOMEDATADIR="@0@"'.format(ev_datadir),
'-DEVINCE_COMPILATION',
'-DGDK_MULTIHEAD_SAFE',
'-DGTK_MULTIHEAD_SAFE',
]
evince_ldflags = common_ldflags
if ev_platform == 'win32'
resource = 'evince-icon.o'
evince_ldflag += custom_target(
resource,
input: 'evince-icon.rc',
output: resource,
command: [find_program('windres'), '@INPUT@', '-I', data_dir, '@OUTPUT@'],
)
else
evince_deps += adwaita_icon_theme_dep
endif
if enable_dbus
evince_sources += files('ev-media-player-keys.c')
gdbus = 'ev-gdbus'
evince_sources += gnome.gdbus_codegen(
gdbus + '-generated',
gdbus + '.xml',
interface_prefix: ev_namespace,
namespace: ev_code_prefix,
object_manager: true,
autocleanup: 'objects',
)
endif
if enable_keyring
evince_deps += libsecret_dep
endif
evince = executable(
'evince',
sources: evince_sources,
include_directories: top_inc,
dependencies: evince_deps,
c_args: evince_cflags,
install: true,
)
if enable_dbus
evinced_sources = files('ev-daemon.c')
gdbus = 'ev-daemon-gdbus'
# The D-Bus interface names are in lowercase, which does not match
# the application name nor the namespace. However, we keep the
# interface prefix in lowercase for backward compatibility.
evinced_sources += gnome.gdbus_codegen(
gdbus + '-generated',
gdbus + '.xml',
interface_prefix: ev_namespace.to_lower(),
namespace: ev_code_prefix,
object_manager: true,
autocleanup: 'objects',
)
evinced_deps = [
gio_dep,
gio_unix_dep,
]
evinced_cflags = [
'-DBINDIR="@0@"'.format(ev_bindir),
'-DEVINCE_COMPILATION',
]
evinced = executable(
'evinced',
evinced_sources,
include_directories: top_inc,
dependencies: evinced_deps,
c_args: evinced_cflags,
install: true,
install_dir: ev_libexecdir,
)
endif