193 lines
5.9 KiB
Diff
193 lines
5.9 KiB
Diff
From 06b18a884c8cf3257ea1f053a82784da078999ed Mon Sep 17 00:00:00 2001
|
|
From: Michael Webster <miketwebster@gmail.com>
|
|
Date: Fri, 4 Aug 2023 09:41:57 -0400
|
|
Subject: [PATCH] Fix building with meson 1.2.
|
|
|
|
Thanks to @heftig for the patch.
|
|
|
|
Fixes #612.
|
|
---
|
|
cut-n-paste/meson.build | 3 ---
|
|
cut-n-paste/smclient/meson.build | 6 ++++++
|
|
cut-n-paste/synctex/meson.build | 6 ++++++
|
|
cut-n-paste/totem-screensaver/meson.build | 6 ++++++
|
|
cut-n-paste/zoom-control/meson.build | 6 ++++++
|
|
libdocument/meson.build | 6 ++++--
|
|
libmisc/meson.build | 6 ++++++
|
|
libview/meson.build | 6 ++++++
|
|
shell/meson.build | 26 ++++++++++++++++-------
|
|
9 files changed, 58 insertions(+), 13 deletions(-)
|
|
|
|
diff --git a/cut-n-paste/meson.build b/cut-n-paste/meson.build
|
|
index 0f79ebb8..5fd89d2e 100644
|
|
--- a/cut-n-paste/meson.build
|
|
+++ b/cut-n-paste/meson.build
|
|
@@ -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')
|
|
diff --git a/cut-n-paste/smclient/meson.build b/cut-n-paste/smclient/meson.build
|
|
index ca129a3d..5c9eea93 100644
|
|
--- a/cut-n-paste/smclient/meson.build
|
|
+++ b/cut-n-paste/smclient/meson.build
|
|
@@ -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('.')],
|
|
+)
|
|
diff --git a/cut-n-paste/synctex/meson.build b/cut-n-paste/synctex/meson.build
|
|
index 0f063adb..305c4f56 100644
|
|
--- a/cut-n-paste/synctex/meson.build
|
|
+++ b/cut-n-paste/synctex/meson.build
|
|
@@ -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('.'),
|
|
+)
|
|
diff --git a/cut-n-paste/totem-screensaver/meson.build b/cut-n-paste/totem-screensaver/meson.build
|
|
index faac9b7c..a67c2f96 100644
|
|
--- a/cut-n-paste/totem-screensaver/meson.build
|
|
+++ b/cut-n-paste/totem-screensaver/meson.build
|
|
@@ -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('.')],
|
|
+)
|
|
diff --git a/cut-n-paste/zoom-control/meson.build b/cut-n-paste/zoom-control/meson.build
|
|
index f48567fc..2c3320ac 100644
|
|
--- a/cut-n-paste/zoom-control/meson.build
|
|
+++ b/cut-n-paste/zoom-control/meson.build
|
|
@@ -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,
|
|
+)
|
|
diff --git a/libdocument/meson.build b/libdocument/meson.build
|
|
index 6c0d6e34..5965a582 100644
|
|
--- a/libdocument/meson.build
|
|
+++ b/libdocument/meson.build
|
|
@@ -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,
|
|
@@ -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]
|
|
)
|
|
|
|
diff --git a/libmisc/meson.build b/libmisc/meson.build
|
|
index 280d3b03..e0140736 100644
|
|
--- a/libmisc/meson.build
|
|
+++ b/libmisc/meson.build
|
|
@@ -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,
|
|
+)
|
|
diff --git a/libview/meson.build b/libview/meson.build
|
|
index b1c18504..77c7f023 100644
|
|
--- a/libview/meson.build
|
|
+++ b/libview/meson.build
|
|
@@ -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,
|
|
diff --git a/shell/meson.build b/shell/meson.build
|
|
index cff438b3..4060ceec 100644
|
|
--- a/shell/meson.build
|
|
+++ b/shell/meson.build
|
|
@@ -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,
|
|
)
|