summaryrefslogtreecommitdiff
path: root/shell/meson.build
blob: b3afb75cd37ed7cb8aacd08b4abe893ab3c05bf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
shell_sources = [
    'eggfindbar.c',
    'eggfindbar.h',
    'ev-annotation-properties-dialog.h',
    'ev-annotation-properties-dialog.c',
    'ev-bookmarks.h',
    'ev-bookmarks.c',
    'ev-bookmark-action.h',
    'ev-bookmark-action.c',
    'ev-application.c',
    'ev-application.h',
    'ev-file-monitor.h',
    'ev-file-monitor.c',
    'ev-history.c',
    'ev-history.h',
    'ev-keyring.h',
    'ev-keyring.c',
    'ev-message-area.c',
    'ev-message-area.h',
    'ev-metadata.c',
    'ev-metadata.h',
    'ev-password-view.h',
    'ev-password-view.c',
    'ev-progress-message-area.h',
    'ev-progress-message-area.c',
    'ev-properties-dialog.c',
    'ev-properties-dialog.h',
    'ev-properties-fonts.c',
    'ev-properties-fonts.h',
    'ev-properties-license.c',
    'ev-properties-license.h',
    'ev-open-recent-action.c',
    'ev-open-recent-action.h',
    'ev-utils.c',
    'ev-utils.h',
    'ev-window.c',
    'ev-window.h',
    'ev-window-title.c',
    'ev-window-title.h',
    'ev-sidebar.c',
    'ev-sidebar.h',
    'ev-sidebar-annotations.c',
    'ev-sidebar-annotations.h',
    'ev-sidebar-attachments.c',
    'ev-sidebar-attachments.h',
    'ev-sidebar-bookmarks.h',
    'ev-sidebar-bookmarks.c',
    'ev-sidebar-layers.c',
    'ev-sidebar-layers.h',
    'ev-sidebar-links.c',
    'ev-sidebar-links.h',
    'ev-sidebar-page.c',
    'ev-sidebar-page.h',
    'ev-sidebar-thumbnails.c',
    'ev-sidebar-thumbnails.h',
]

ev_marshal = gnome.genmarshal(
    'ev-marshal',
    sources: 'ev-marshal.list',
    prefix: 'ev_marshal'
)

shell_sources += ev_marshal

ev_resources = gnome.compile_resources(
    'atril-resources',
    'atril.gresource.xml',
    source_dir: '../data',
    c_name: 'ev',
)

shell_sources += ev_resources

atril_deps = [
    libdocument_dep,
    config_h,
    gio,
    glib,
    gtk,
    libsecret,
    math,
]

if get_option('enable_dbus')
    dbus_generated = gnome.gdbus_codegen(
        'ev-gdbus-generated',
        'ev-gdbus.xml',
        interface_prefix: 'org.x.reader',
        namespace: 'Ev',
        object_manager: true,
    )

    dbus_daemon_generated = gnome.gdbus_codegen(
        'ev-daemon-gdbus-generated',
        'ev-daemon-gdbus.xml',
        interface_prefix: 'org.x.reader',
        namespace: 'Ev',
        object_manager: true,
    )

    shell_sources += dbus_generated

    atrild_sources = [
        'ev-daemon.c',
    ]

    atrild_sources += dbus_daemon_generated

    executable(
        'atrild',
        atrild_sources,
        include_directories: include_dirs,
        dependencies: atril_deps,
        install: true,
        install_dir: libexecdir,
    )
endif

libshell_deps = [
    atril_deps,
    libview_dep,
    libmisc_dep,
    libsmclient_dep,
    libephyzoom_dep,
]

libshell = static_library(
    'shell',
    shell_sources,
    dependencies: libshell_deps,
    include_directories: include_dirs,
)

libshell_dep = declare_dependency(
  link_whole: libshell,  # Need the whole lib for gresource lookup
  dependencies: libshell_deps,
  include_directories: include_dirs,
)

atril = executable(
    'atril',
    'main.c',
    dependencies: libshell_dep,
    install: true,
)