From 12277dda957bd6c6d91747ce3988d2d3ae0445ce Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 13 Aug 2020 23:54:37 +0000 Subject: [PATCH] Use pkgconfig to get flags needed for GL library. This gets it to build on OpenBSD. Before this change, the GL library isn't found: Configuring library for OpenGLRaw-3.3.4.0.. cabal: Missing dependency on a foreign library: * Missing (or bad) C library: GL --- OpenGLRaw.cabal | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenGLRaw.cabal b/OpenGLRaw.cabal index fb6b3a7a..b63ba2be 100644 --- a/OpenGLRaw.cabal +++ b/OpenGLRaw.cabal @@ -709,6 +709,12 @@ library CPP PatternSynonyms ScopedTypeVariables + if os(openbsd) + -- OpenBSD keeps OpenGL libs under /usr/X11R6. Without the following line, + -- we get an error like this: + -- cabal: Missing dependency on a foreign library: + -- * Missing (or bad) C library: GL + pkgconfig-depends: gl if os(windows) && flag(UseNativeWindowsLibraries) if arch(i386) cpp-options: "-DCALLCONV=stdcall"