summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2019-01-20 11:36:56 +0100
committerJonas Ådahl <jadahl@gmail.com>2019-01-22 18:31:52 +0100
commit54685091f1bb98b9fcf45085031c9fa19caf7899 (patch)
tree9d631437fb2af9e400c892e0f89041e79b3e65e3
parentd4a9535f04b4b230c1dd41285c0bd4bba18f8616 (diff)
downloadmutter-54685091f1bb98b9fcf45085031c9fa19caf7899.tar.gz
cogl-path: Remove own glu.h version
cogl-path uses types from glu.h, but to avoid a build dependency on glu, it kept a minified copy of glu.h in tree. Drop this file and just use the actual glu.h. To avoid linking to libGLU.so, just use the includepath, instead of actually adding glu as a real dependency. This means we can remove an includepath meant to make it possible to include <GL/glu.h>.
-rw-r--r--.gitlab-ci/Dockerfile2
-rw-r--r--cogl/cogl-path/meson.build10
-rw-r--r--cogl/cogl-path/tesselator/GL/glu.h47
-rw-r--r--meson.build1
4 files changed, 9 insertions, 51 deletions
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
index dafa5ac24..f755b126c 100644
--- a/.gitlab-ci/Dockerfile
+++ b/.gitlab-ci/Dockerfile
@@ -5,7 +5,7 @@ RUN dnf -y update && dnf -y upgrade && \
dnf builddep -y mutter && \
# Until Fedora catches up with meson build-deps
- dnf install -y meson xorg-x11-server-Xorg gnome-settings-daemon-devel egl-wayland-devel xorg-x11-server-Xwayland && \
+ dnf install -y meson xorg-x11-server-Xorg gnome-settings-daemon-devel egl-wayland-devel xorg-x11-server-Xwayland mesa-libGLU-devel && \
# For running unit tests
dnf install -y xorg-x11-server-Xvfb mesa-dri-drivers dbus dbus-x11 && \
diff --git a/cogl/cogl-path/meson.build b/cogl/cogl-path/meson.build
index 03b09a58d..37cd18fc4 100644
--- a/cogl/cogl-path/meson.build
+++ b/cogl/cogl-path/meson.build
@@ -33,10 +33,9 @@ cogl_path_sources = [
'tesselator/tesselator.h',
'tesselator/tessmono.c',
'tesselator/tessmono.h',
- 'tesselator/GL/glu.h',
]
-cogl_path_includepath = include_directories('.', 'tesselator')
+cogl_path_includepath = include_directories('.')
libmutter_cogl_path_enum_types = gnome.mkenums('cogl-path-enum-types',
sources: 'cogl-path-types.h',
@@ -49,10 +48,15 @@ libmutter_cogl_path_enum_types_h = libmutter_cogl_path_enum_types[1]
cogl_path_sources += libmutter_cogl_path_enum_types
+cogl_path_c_args = [
+ cogl_c_args,
+ '-I@0@'.format(glu_dep.get_pkgconfig_variable('includedir')),
+]
+
libmutter_cogl_path = shared_library('mutter-cogl-path-' + libmutter_api_version,
sources: [cogl_path_sources, cogl_path_public_headers],
soversion: '0.0.0',
- c_args: cogl_c_args,
+ c_args: cogl_path_c_args,
include_directories: [cogl_includepath, cogl_path_includepath],
link_depends: 'libmutter-cogl-path.map',
dependencies: [libmutter_cogl_dep, cogl_deps],
diff --git a/cogl/cogl-path/tesselator/GL/glu.h b/cogl/cogl-path/tesselator/GL/glu.h
deleted file mode 100644
index 18c4024b7..000000000
--- a/cogl/cogl-path/tesselator/GL/glu.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Cogl
- *
- * A Low Level GPU Graphics and Utilities API
- *
- * Copyright (C) 2010 Intel Corporation.
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy,
- * modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-/* This is just a wrapper to use our simplified version of glu.h so
- that the tesselator code can still #include <GL/glu.h> */
-
-#include "../tesselator.h"
-
-/* These aren't defined on GLES and we don't really want the
- tesselator code to use them but we're also trying to avoid
- modifying the C files so we just force them to be empty here */
-
-#undef GLAPI
-#define GLAPI
-
-#undef GLAPIENTRY
-#define GLAPIENTRY
-
-/* GLES doesn't define a GLdouble type so lets just force it to a
- regular double */
-#define GLdouble double
diff --git a/meson.build b/meson.build
index be1b829a3..0c021fb09 100644
--- a/meson.build
+++ b/meson.build
@@ -120,6 +120,7 @@ xinerama_dep = dependency('xinerama')
ice_dep = dependency('ice')
atk_dep = dependency('atk', version: atk_req)
libcanberra_dep = dependency('libcanberra', version: libcanberra_req)
+glu_dep = dependency('glu')
# For now always require X11 support
have_x11 = true