Skip to content

Commit

Permalink
Fix building with meson 1.2.
Browse files Browse the repository at this point in the history
Thanks to @heftig for the patch.

Fixes #612.
  • Loading branch information
mtwebster committed Aug 4, 2023
1 parent 94c8e58 commit 06b18a8
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 13 deletions.
3 changes: 0 additions & 3 deletions cut-n-paste/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@ subdir('zoom-control')
subdir('totem-screensaver')
subdir('smclient')
subdir('synctex')

cnc_includes = include_directories('zoom-control', 'totem-screensaver', 'smclient')
synctex_includes = include_directories('synctex')
6 changes: 6 additions & 0 deletions cut-n-paste/smclient/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ libsmclient = static_library(
dependencies: smclient_deps,
include_directories: include_dirs,
)

libsmclient_dep = declare_dependency(
link_with: libsmclient,
dependencies: smclient_deps,
include_directories: [include_root, include_directories('.')],
)
6 changes: 6 additions & 0 deletions cut-n-paste/synctex/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ libsynctex = static_library(
synctex_sources,
dependencies: synctex_deps,
)

libsynctex_dep = declare_dependency(
link_with: libsynctex,
dependencies: synctex_deps,
include_directories: include_directories('.'),
)
6 changes: 6 additions & 0 deletions cut-n-paste/totem-screensaver/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ libtotemscrsaver = static_library(
dependencies: totem_screensaver_deps,
include_directories: include_root,
)

libtotemscrsaver_dep = declare_dependency(
link_with: libtotemscrsaver,
dependencies: totem_screensaver_deps,
include_directories: [include_root, include_directories('.')],
)
6 changes: 6 additions & 0 deletions cut-n-paste/zoom-control/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ libephyzoom = static_library(
include_directories: include_root,
dependencies: zoom_deps,
)

libephyzoom_dep = declare_dependency(
link_with: libephyzoom,
include_directories: [include_root, include_directories('.')],
dependencies: zoom_deps,
)
6 changes: 4 additions & 2 deletions libdocument/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ libdocument_deps = [
gmodule,
gtk,
math,
libsynctex_dep,
]

libdocument = library(
'xreaderdocument',
libdocument_private_headers + libdocument_sources,
dependencies: libdocument_deps,
include_directories: [include_root, synctex_includes],
link_whole: [libsynctex],
include_directories: include_root,
soversion: binary_major_version,
version: binary_version,
install: true,
Expand All @@ -137,6 +137,8 @@ libdocument = library(
# this is needed so targets that depend on generated headers can do so
libdocument_dep = declare_dependency(
link_with: libdocument,
dependencies: libdocument_deps,
include_directories: include_root,
sources: libdoc_enums[1]
)

Expand Down
6 changes: 6 additions & 0 deletions libmisc/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ libmisc = static_library(
include_directories: include_dirs,
dependencies: libmisc_deps,
)

libmisc_dep = declare_dependency(
link_with: libmisc,
include_directories: include_dirs,
dependencies: libmisc_deps,
)
6 changes: 6 additions & 0 deletions libview/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ libview = library(
install: true,
)

libview_dep = declare_dependency(
link_with: libview,
include_directories: include_dirs,
dependencies: libview_deps,
)

install_headers(
libview_headers,
subdir: libview_header_dir,
Expand Down
26 changes: 18 additions & 8 deletions shell/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,31 @@ if get_option('enable_dbus')
)
endif

libshell_deps = [
xreader_deps,
libview_dep,
libmisc_dep,
libtotemscrsaver_dep,
libsmclient_dep,
libephyzoom_dep,
]

libshell = static_library(
'shell',
shell_sources,
link_with: libview,
link_whole: [libmisc, libtotemscrsaver, libsmclient, libephyzoom],
dependencies: xreader_deps,
include_directories: [include_dirs, cnc_includes],
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,
)

xreader = executable(
'xreader',
'main.c',
link_with: libview,
link_whole: libshell,
dependencies: xreader_deps,
include_directories: [include_dirs, cnc_includes],
dependencies: libshell_dep,
install: true,
)

0 comments on commit 06b18a8

Please sign in to comment.