
include_directories(
	${GLEXT_INCLUDE_DIR}
	${OPENGL_INCLUDE_PATH}
)

link_libraries (
	piglitutil_${piglit_target_api}
	${EGL_LDFLAGS}
	${OPENGL_gl_LIBRARY}
	${OPENGL_glu_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-configless-context egl-configless-context.c)
	target_link_libraries(egl-configless-context 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})
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

# vim: ft=cmake:
