From d31ecd8986bea0e9ab7aaacaf213113e50ad0951 Mon Sep 17 00:00:00 2001 From: Ryan Carsten Schmidt Date: Thu, 14 Dec 2023 18:58:15 -0600 Subject: [PATCH] Link with OpenGL framework on macOS Fixes "ld: library not found for -lGL" --- OSBindings/SDL/SConstruct | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OSBindings/SDL/SConstruct b/OSBindings/SDL/SConstruct index 56d8e7904..094b0df6f 100644 --- a/OSBindings/SDL/SConstruct +++ b/OSBindings/SDL/SConstruct @@ -140,11 +140,14 @@ SOURCES += glob.glob('../../Storage/Tape/Parsers/*.cpp') env.Append(CCFLAGS = ['--std=c++17', '--std=c++1z', '-Wall', '-O2', '-DNDEBUG']) # Add additional libraries to link against. -env.Append(LIBS = ['libz', 'pthread', 'GL']) +env.Append(LIBS = ['libz', 'pthread']) +# Add additional platform-specific compiler flags, libraries, and frameworks. if env['PLATFORM'] == 'darwin': env.Append(CCFLAGS = ['-DGL_SILENCE_DEPRECATION']) - env.Append(FRAMEWORKS = ['Accelerate']) + env.Append(FRAMEWORKS = ['Accelerate', 'OpenGL']) +else: + env.Append(LIBS = ['GL']) # Build target. env.Program(target = 'clksignal', source = SOURCES)