
include_directories(
	${GLEXT_INCLUDE_DIR}
	${OPENGL_INCLUDE_PATH}
)

link_libraries (
	piglitutil_${piglit_target_api}
	${EGL_LDFLAGS}
	${OPENGL_gl_LIBRARY}
)

IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
	piglit_add_executable (egl-nok-swap-region egl-util.c egl-nok-swap-region.c)
	target_link_libraries(egl-nok-swap-region pthread ${X11_X11_LIB})
	piglit_add_executable (egl-nok-texture-from-pixmap egl-util.c egl-nok-texture-from-pixmap.c)
	target_link_libraries(egl-nok-texture-from-pixmap pthread ${X11_X11_LIB})
	piglit_add_executable (egl-create-surface egl-util.c egl-create-surface.c)
	target_link_libraries(egl-create-surface pthread ${X11_X11_LIB})
	piglit_add_executable (egl-query-surface egl-util.c egl-query-surface.c)
	target_link_libraries(egl-query-surface pthread ${X11_X11_LIB})
	piglit_add_executable (egl-create-pbuffer-surface egl-util.c egl-create-pbuffer-surface.c)
	target_link_libraries(egl-create-pbuffer-surface pthread ${X11_X11_LIB})
	piglit_add_executable (egl-create-msaa-pbuffer-surface egl-util.c egl-create-msaa-pbuffer-surface.c)
	target_link_libraries(egl-create-msaa-pbuffer-surface pthread ${X11_X11_LIB})
	piglit_add_executable (egl-create-largest-pbuffer-surface egl-util.c egl-create-largest-pbuffer-surface.c)
	target_link_libraries(egl-create-largest-pbuffer-surface pthread ${X11_X11_LIB})
	piglit_add_executable (egl-configless-context egl-configless-context.c)
	target_link_libraries(egl-configless-context pthread ${X11_X11_LIB})
	piglit_add_executable (egl-copy-buffers egl-util.c egl-copy-buffers.c)
	target_link_libraries(egl-copy-buffers pthread ${X11_X11_LIB})
	piglit_add_executable (egl-gl-colorspace egl-util.c egl-gl-colorspace.c)
	target_link_libraries(egl-gl-colorspace pthread ${X11_X11_LIB})
	piglit_add_executable (egl-invalid-attr egl-invalid-attr.c)
	target_link_libraries(egl-invalid-attr pthread)
	piglit_add_executable (egl-context-priority egl-context-priority.c)
	target_link_libraries(egl-context-priority pthread)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

# vim: ft=cmake:
