build: Remove the config.h inclusion from all public headers

Do not include it at header side as it is not part of the installed headers.

Only keep it in cogl-gl-headers.h as it is a private header.

Add it to all the source files that depend on it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3593>
This commit is contained in:
Corentin Noël 2024-02-16 23:48:18 +01:00 committed by Marge Bot
parent 5b49e0853c
commit e7de5c36f3
20 changed files with 17 additions and 22 deletions

View File

@ -15,6 +15,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "clutter/clutter-blur-private.h"
#include "clutter/clutter-backend.h"

View File

@ -15,6 +15,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "clutter/clutter-frame-private.h"
G_DEFINE_BOXED_TYPE (ClutterFrame, clutter_frame,

View File

@ -22,6 +22,8 @@
#include <glib.h>
#include <glib/gprintf.h>
#include "config.h"
#include "clutter/clutter-keyval.h"
#include "clutter/clutter-event.h"
#include "clutter/clutter-keysyms.h"
@ -210,4 +212,4 @@ clutter_keyval_name (unsigned int keyval)
}
return NULL;
}
}

View File

@ -16,6 +16,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "clutter/clutter-pick-stack-private.h"
#include "clutter/clutter-private.h"

View File

@ -28,7 +28,6 @@
#pragma once
#include "config.h"
#include "cogl/cogl-macros.h"
#include "cogl/cogl-types.h"

View File

@ -30,9 +30,6 @@
#pragma once
#include "config.h"
#include "config.h"
#include "cogl/cogl-texture.h"
#include "cogl/cogl-meta-texture.h"
#include "cogl/cogl-frame-info-private.h"

View File

@ -37,7 +37,6 @@
#include <stdint.h>
#include <stddef.h>
#include "config.h"
#include "cogl/cogl-macros.h"
#include <glib.h>

View File

@ -36,7 +36,6 @@
#error "Only <cogl/cogl.h> can be included directly."
#endif
#include "config.h"
#include "cogl/cogl-context.h"
#include <poll.h>

View File

@ -35,7 +35,6 @@
#endif
#include "cogl/cogl-macros.h"
#include "config.h"
#include "cogl/cogl-pixel-buffer.h"
#include "cogl/cogl-pixel-format.h"
#include "cogl/cogl-bitmap.h"

View File

@ -32,7 +32,6 @@
#include <stdint.h>
#include <errno.h>
#include "config.h"
#include "cogl/cogl-macros.h"
#ifdef HAVE_PROFILER

View File

@ -33,7 +33,6 @@
#include <glib.h>
#include <math.h>
#include "config.h"
#include "cogl/cogl-pixel-format.h"
#include "cogl/cogl-types.h"

View File

@ -35,7 +35,6 @@
#endif
#include "cogl/cogl-types.h"
#include "config.h"
#include "cogl/cogl-macros.h"
#include "cogl/deprecated/cogl-program.h"

View File

@ -132,12 +132,6 @@ if have_gles2
cogl_driver_sources += gles_driver_sources
endif
if have_gl or have_gles2
cogl_nonintrospected_headers += [
'cogl-gl-header.h'
]
endif
cogl_sources = [
cogl_driver_sources,
'cogl-atlas-texture-private.h',
@ -194,6 +188,7 @@ cogl_sources = [
'cogl-framebuffer-private.h',
'cogl-framebuffer.c',
'cogl-glib-source.c',
'cogl-gl-header.h',
'cogl-glsl-shader-boilerplate.h',
'cogl-graphene.c',
'cogl-half-float.c',

View File

@ -30,7 +30,6 @@
#pragma once
#include "config.h"
#include "cogl/cogl-context.h"
#include "cogl/cogl-context-private.h"
#include "cogl/cogl-framebuffer-private.h"

View File

@ -19,6 +19,8 @@
* Author: Marco Trevisan <marco.trevisan@canonical.com>
*/
#include "config.h"
#include "backends/meta-input-settings-dummy.h"
G_DEFINE_TYPE (MetaInputSettingsDummy,

View File

@ -20,6 +20,8 @@
* Dor Askayo <dor.askayo@gmail.com>
*/
#include "config.h"
#include "backends/native/meta-renderer-view-native.h"
#include "backends/native/meta-frame-native.h"

View File

@ -2,8 +2,6 @@
#pragma once
#include "config.h"
#include "backends/meta-backend-types.h"
#include "meta/meta-shaped-texture.h"
#include "meta/window.h"

View File

@ -1,4 +1,5 @@
/*** BEGIN file-header ***/
#include "config.h"
#include "meta/meta-enum-types.h"
/*** END file-header ***/

View File

@ -19,8 +19,6 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#pragma once
#define __CLUTTER_H_INSIDE__

View File

@ -18,6 +18,8 @@
* Author: Sebastian Wick <sebastian.wick@redhat.com>
*/
#include "config.h"
#include "hdr-metadata-unit-tests.h"
#include "tests/meta-monitor-test-utils.h"