From ac75ea342b80ab3bf723a44391051e346b3ebf3e Mon Sep 17 00:00:00 2001 From: Christo Mitov Date: Tue, 3 Nov 2020 22:54:29 -0500 Subject: [PATCH] switch build flags to use opengl framework rather than gl library for OSX (#2467) * switch build flags to use opengl framework rather than library for OSX * little cleaner * arch Co-authored-by: thatsaboi Co-authored-by: Adeeb Shihadeh old-commit-hash: 029be4901217ba4aada3a24b5b3d113aee359369 --- selfdrive/camerad/SConscript | 3 ++- selfdrive/ui/SConscript | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/selfdrive/camerad/SConscript b/selfdrive/camerad/SConscript index e6b672ef48..4cc05b995e 100644 --- a/selfdrive/camerad/SConscript +++ b/selfdrive/camerad/SConscript @@ -28,8 +28,9 @@ else: if arch == "Darwin": del libs[libs.index('OpenCL')] + del libs[libs.index(gpucommon)][gpucommon.index('GL')] env = env.Clone() - env['FRAMEWORKS'] = ['OpenCL'] + env['FRAMEWORKS'] = ['OpenCL', 'OpenGL'] env.SharedLibrary('snapshot/visionipc', ["#selfdrive/common/visionipc.c", "#selfdrive/common/ipc.c"]) diff --git a/selfdrive/ui/SConscript b/selfdrive/ui/SConscript index ad7c2d06fc..b3835c4207 100644 --- a/selfdrive/ui/SConscript +++ b/selfdrive/ui/SConscript @@ -17,15 +17,16 @@ else: qt_libs = ["pthread"] qt_modules = ["Widgets", "Gui", "Core", "DBus", "Multimedia"] - if arch == "Darwin": - qt_env["FRAMEWORKS"] += [f"Qt{m}" for m in qt_modules] - else: - qt_libs += [f"Qt5{m}" for m in qt_modules] if arch == "larch64": qt_libs += ["GLESv2", "wayland-client"] - else: + elif arch != "Darwin": qt_libs += ["GL"] + if arch == "Darwin": + qt_env["FRAMEWORKS"] += [f"Qt{m}" for m in qt_modules] + ["OpenGL"] + else: + qt_libs += [f"Qt5{m}" for m in qt_modules] + qt_src = ["qt/ui.cc", "qt/window.cc", "qt/qt_sound.cc", "qt/offroad/settings.cc", "qt/offroad/onboarding.cc"] + src qt_env.Program("_ui", qt_src, LIBS=qt_libs + libs)