backend: Conditionally compile MetaProfiler
MetaProfiler is not built when -Dprofiler=false, and that breaks the build since MetaBackend unconditionally imports and uses it. Fix that by wrapping MetaProfiler in compile-time checks. https://gitlab.gnome.org/GNOME/mutter/merge_requests/603
This commit is contained in:
parent
78254146f3
commit
57945a730f
1 changed files with 12 additions and 1 deletions
|
@ -64,9 +64,12 @@
|
||||||
#include "clutter/clutter-mutter.h"
|
#include "clutter/clutter-mutter.h"
|
||||||
#include "meta/main.h"
|
#include "meta/main.h"
|
||||||
#include "meta/meta-backend.h"
|
#include "meta/meta-backend.h"
|
||||||
#include "backends/meta-profiler.h"
|
|
||||||
#include "meta/util.h"
|
#include "meta/util.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_PROFILER
|
||||||
|
#include "backends/meta-profiler.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_REMOTE_DESKTOP
|
#ifdef HAVE_REMOTE_DESKTOP
|
||||||
#include "backends/meta-dbus-session-watcher.h"
|
#include "backends/meta-dbus-session-watcher.h"
|
||||||
#include "backends/meta-remote-access-controller-private.h"
|
#include "backends/meta-remote-access-controller-private.h"
|
||||||
|
@ -127,7 +130,10 @@ struct _MetaBackendPrivate
|
||||||
MetaScreenCast *screen_cast;
|
MetaScreenCast *screen_cast;
|
||||||
MetaRemoteDesktop *remote_desktop;
|
MetaRemoteDesktop *remote_desktop;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PROFILER
|
||||||
MetaProfiler *profiler;
|
MetaProfiler *profiler;
|
||||||
|
#endif
|
||||||
|
|
||||||
ClutterBackend *clutter_backend;
|
ClutterBackend *clutter_backend;
|
||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
|
@ -194,7 +200,10 @@ meta_backend_finalize (GObject *object)
|
||||||
g_hash_table_destroy (priv->device_monitors);
|
g_hash_table_destroy (priv->device_monitors);
|
||||||
|
|
||||||
g_clear_object (&priv->settings);
|
g_clear_object (&priv->settings);
|
||||||
|
|
||||||
|
#ifdef HAVE_PROFILER
|
||||||
g_clear_object (&priv->profiler);
|
g_clear_object (&priv->profiler);
|
||||||
|
#endif
|
||||||
|
|
||||||
G_OBJECT_CLASS (meta_backend_parent_class)->finalize (object);
|
G_OBJECT_CLASS (meta_backend_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
@ -844,7 +853,9 @@ meta_backend_initable_init (GInitable *initable,
|
||||||
system_bus_gotten_cb,
|
system_bus_gotten_cb,
|
||||||
backend);
|
backend);
|
||||||
|
|
||||||
|
#ifdef HAVE_PROFILER
|
||||||
priv->profiler = meta_profiler_new ();
|
priv->profiler = meta_profiler_new ();
|
||||||
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue