+include_directories (
+ ${OPENGL_INCLUDE_PATH}
+ ${GLUT_INCLUDE_DIR}
+ ${GLEW_INCLUDE_DIR}
+)
+
+link_libraries (
+ ${GLUT_glut_LIBRARY}
+ ${GLEW_glew_LIBRARY}
+ ${OPENGL_glu_LIBRARY}
+ ${OPENGL_gl_LIBRARY}
+)
+
+set (subdir gl)
+
+set (targets
+ tri
+)
+
+foreach (target ${targets})
+ add_executable (${subdir}_${target} ${target}.c)
+ set_target_properties (${subdir}_${target} PROPERTIES OUTPUT_NAME ${target})
+ install (TARGETS ${subdir}_${target} DESTINATION ${subdir})
+endforeach (target)