[364/906] make the cmake build work on MacOSX
authorJulien Isorce <julien.isorce@gmail.com>
Fri, 24 Jul 2009 08:33:47 +0000 (10:33 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:22 +0000 (19:31 +0000)
We can now generate a Xcode project (or Unix Makfiles),
see INSTALL file

gst-libs/gst/gl/CMakeLists.txt [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 4e05d1f..3b6b21c
@@ -35,19 +35,46 @@ target_link_libraries(gstgl
 
 else (WIN32)
 
-include_directories(AFTER
-  ../../..)
+  if (APPLE)
+  
+    include_directories(AFTER
+      ../../..)
+    
+    add_library (gstgl STATIC
+      gstglwindow_cocoa.m
+      gstgldisplay.c
+      gstglbuffer.c
+      gstglfilter.c
+      gstglshader.c)
+    
+    target_link_libraries(gstgl
+      general ${OPENGL_LIBRARIES}
+      general ${GLEW_LIBRARY}
+      general ${GLIB2_LIBRARIES}
+      general ${GSTREAMER_LIBRARIES}
+      "-L/opt/local/lib"
+      "-lintl"
+      "-framework OpenGL"
+      "-framework Cocoa")
 
-add_library (gstgl STATIC
-  gstglwindow_x11.c
-  gstgldisplay.c
-  gstglbuffer.c
-  gstglfilter.c
-  gstglshader.c)
-
-target_link_libraries(gstgl
-  general ${OPENGL_LIBRARIES}
-  general ${GLEW_LIBRARY}
-  general ${GLIB2_LIBRARIES}
-  general ${GSTREAMER_LIBRARIES})
+  else (APPLE)
+  
+    include_directories(AFTER
+      ../../..)
+    
+    add_library (gstgl STATIC
+      gstglwindow_x11.c
+      gstgldisplay.c
+      gstglbuffer.c
+      gstglfilter.c
+      gstglshader.c)
+    
+    target_link_libraries(gstgl
+      general ${OPENGL_LIBRARIES}
+      general ${GLEW_LIBRARY}
+      general ${GLIB2_LIBRARIES}
+      general ${GSTREAMER_LIBRARIES})
+      
+  endif (APPLE)
+  
 endif (WIN32)