fix macOS headless build

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2023-01-01 20:13:49 +00:00
parent 82bbd00b75
commit 696e404009
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
3 changed files with 41 additions and 1 deletions

1
.gitignore vendored
View file

@ -18,6 +18,7 @@ compile_commands.json
/bin/
/build/
/build-headless/
/deps/surge-build/
/documentation.pdf
/jucewrapper/build/

39
include/OpenGL/gl.h Normal file
View file

@ -0,0 +1,39 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the LICENSE file.
*/
#pragma once
#ifdef HEADLESS
# define GL_COLOR_BUFFER_BIT 0
# define GL_DEPTH_BUFFER_BIT 0
# define GL_STENCIL_BUFFER_BIT 0
# define GL_PROJECTION 0
# define GL_TRIANGLES 0
static inline void glBegin(int) {}
static inline void glEnd() {}
static inline void glColor3f(float, float, float) {}
static inline void glVertex3f(float, float, float) {}
static inline void glClear(int) {}
static inline void glClearColor(double, double, double, double) {}
static inline void glLoadIdentity() {}
static inline void glMatrixMode(int) {}
static inline void glOrtho(double, double, double, double, double, double) {}
static inline void glViewport(double, double, double, double) {}
typedef unsigned int GLuint;
#else
# include_next <OpenGL/gl.h>
#endif

View file

@ -282,7 +282,7 @@ clap: $(TARGETS)
$(MAKE) clap -C CardinalSynth $(CARDINAL_SYNTH_ARGS)
clean:
rm -f $(TARGETS)
rm -f *.a
rm -rf $(BUILD_DIR)
$(MAKE) clean -C Cardinal
$(MAKE) clean -C CardinalFX $(CARDINAL_FX_ARGS)