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
@ -64,9 +64,12 @@
|
||||
#include "clutter/clutter-mutter.h"
|
||||
#include "meta/main.h"
|
||||
#include "meta/meta-backend.h"
|
||||
#include "backends/meta-profiler.h"
|
||||
#include "meta/util.h"
|
||||
|
||||
#ifdef HAVE_PROFILER
|
||||
#include "backends/meta-profiler.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_REMOTE_DESKTOP
|
||||
#include "backends/meta-dbus-session-watcher.h"
|
||||
#include "backends/meta-remote-access-controller-private.h"
|
||||
@ -127,7 +130,10 @@ struct _MetaBackendPrivate
|
||||
MetaScreenCast *screen_cast;
|
||||
MetaRemoteDesktop *remote_desktop;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PROFILER
|
||||
MetaProfiler *profiler;
|
||||
#endif
|
||||
|
||||
ClutterBackend *clutter_backend;
|
||||
ClutterActor *stage;
|
||||
@ -194,7 +200,10 @@ meta_backend_finalize (GObject *object)
|
||||
g_hash_table_destroy (priv->device_monitors);
|
||||
|
||||
g_clear_object (&priv->settings);
|
||||
|
||||
#ifdef HAVE_PROFILER
|
||||
g_clear_object (&priv->profiler);
|
||||
#endif
|
||||
|
||||
G_OBJECT_CLASS (meta_backend_parent_class)->finalize (object);
|
||||
}
|
||||
@ -844,7 +853,9 @@ meta_backend_initable_init (GInitable *initable,
|
||||
system_bus_gotten_cb,
|
||||
backend);
|
||||
|
||||
#ifdef HAVE_PROFILER
|
||||
priv->profiler = meta_profiler_new ();
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user