瀏覽代碼

Fix build with OpenGL and without CUDA

Samuel Thibault 11 年之前
父節點
當前提交
5f52c015d5
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      examples/gl_interop/gl_interop_idle.c

+ 4 - 1
examples/gl_interop/gl_interop_idle.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2012 Université de Bordeaux 1
+ * Copyright (C) 2012-2013 Université de Bordeaux 1
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -29,6 +29,8 @@
 
 #include <starpu.h>
 #include <unistd.h>
+
+#if (defined(STARPU_USE_CUDA) && defined(STARPU_OPENGL_RENDER))
 #include <GL/glut.h>
 
 void dummy(void *buffers[], void *cl_arg)
@@ -89,6 +91,7 @@ static void idle(void)
 {
 	starpu_driver_run_once(&drivers[0]);
 }
+#endif
 
 int main(int argc, char **argv)
 {