[gnome-shell] st: Fix generated GLSL dependency
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st: Fix generated GLSL dependency
- Date: Fri, 20 Dec 2019 20:37:45 +0000 (UTC)
commit 15d74c9cd4f6a3792032b1b1e83f838b588b35ef
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Dec 20 20:54:07 2019 +0100
st: Fix generated GLSL dependency
StScrollViewFade depends on st-scroll-view-fade-generated.c, but
that dependency isn't expressed to the build system; we just hope
that the custom target runs before compiling the effect.
Instead, add the generated source to the st target so the dependency
is expressed properly.
(The change from .c to .h is to prevent the file from being both
included and compiled, resulting in a duplicated symbol)
https://bugzilla.gnome.org/show_bug.cgi?id=789937
src/st/meson.build | 9 +++++----
src/st/st-scroll-view-fade.c | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/st/meson.build b/src/st/meson.build
index 7ab203659b..452c30b99f 100644
--- a/src/st/meson.build
+++ b/src/st/meson.build
@@ -155,14 +155,15 @@ st_gir_sources = st_sources + st_headers + st_enums
data_to_c = find_program(meson.source_root() + '/src/data-to-c.pl')
-custom_target('scroll-view-fade-glsl',
+glsl_sources = custom_target('scroll-view-fade-glsl',
input: ['st-scroll-view-fade.glsl'],
- output: ['st-scroll-view-fade-generated.c'],
- build_by_default: true,
+ output: ['st-scroll-view-fade-generated.h'],
capture: true,
command: [data_to_c, '@INPUT@', 'st_scroll_view_fade_glsl']
)
+st_nogir_sources = [glsl_sources]
+
st_cflags = [
'-I@0@/src'.format(meson.source_root()),
'-I@0@'.format(meson.build_root()),
@@ -177,7 +178,7 @@ st_cflags = [
# Currently meson requires a shared library for building girs
libst = shared_library('st-1.0',
- sources: st_gir_sources + croco_sources,
+ sources: st_gir_sources + st_nogir_sources + croco_sources,
c_args: st_cflags,
dependencies: [clutter_dep, gtk_dep, mutter_dep, libxml_dep, m_dep],
build_rpath: mutter_typelibdir,
diff --git a/src/st/st-scroll-view-fade.c b/src/st/st-scroll-view-fade.c
index 8d473d3adf..656fa322fe 100644
--- a/src/st/st-scroll-view-fade.c
+++ b/src/st/st-scroll-view-fade.c
@@ -32,7 +32,7 @@
#define DEFAULT_FADE_OFFSET 68.0f
-#include "st-scroll-view-fade-generated.c"
+#include "st-scroll-view-fade-generated.h"
struct _StScrollViewFade
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]