OpenGL and X11

Mark Brethen mark.brethen at gmail.com
Fri Aug 30 00:32:20 UTC 2019


I'm using macports to install OpenGL (mesa) since High Sierra does not have the X11 parts of it. In the Makefile there are includes and LFLAGS that need to be patched:

diff -ur cgx_2.13/src.orig/Makefile cgx_2.13/src/Makefile
--- cgx_2.13/src.orig/Makefile	2018-04-05 13:32:06.000000000 -0500
+++ cgx_2.13/src/Makefile	2018-12-11 20:50:49.000000000 -0600
@@ -3,13 +3,13 @@
   -I/usr/include \
   -I/usr/include/GL \
   -I../../libSNL/src \
   -I../../glut-3.5/src \
-  -I/usr/X11/include 
+  -I/opt/X11/include
 
 LFLAGS = \
-  -L/usr/lib64 -lGL -lGLU \
-  -L/usr/X11R6/lib64 -lX11 -lXi -lXmu -lXext -lXt -lSM -lICE \
-  -lm -lpthread -lrt
+  -framework OpenGL -framework GLUT \
+  -lX11 -lXi -lXmu -lXext -lXt -lSM -lICE \
+  -lm -lpthread

This seems to work but I’m not sure it's proper.

Mark Brethen
mark.brethen at gmail.com





More information about the macports-dev mailing list