Module: Demos Branch: master Commit: 82660681290fc5831495537763512d7474de6a3b URL: http://cgit.freedesktop.org/mesa/demos/commit/?id=82660681290fc5831495537763512d7474de6a3b
Author: RALOVICH, Kristóf <[email protected]> Date: Thu Jan 6 20:56:41 2011 +0100 cmake: add build system to some of the egl demos Signed-off-by: José Fonseca <[email protected]> --- CMakeLists.txt | 2 ++ src/CMakeLists.txt | 4 ++++ src/egl/CMakeLists.txt | 2 ++ src/egl/eglut/CMakeLists.txt | 7 +++++++ src/egl/opengl/CMakeLists.txt | 15 +++++++++++++++ 5 files changed, 30 insertions(+), 0 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd84233..7b5dcf9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,8 @@ find_package (OpenGL REQUIRED) find_package (GLUT REQUIRED) find_package (X11) +find_library(EGL_egl_LIBRARY EGL /usr/lib) + find_library (GLEW_glew_LIBRARY GLEW /usr/lib ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fa377d1..ac745f0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,6 +14,10 @@ add_subdirectory (vp) add_subdirectory (vpglsl) add_subdirectory (gs) +if(EGL_egl_LIBRARY) + add_subdirectory(egl) +endif(EGL_egl_LIBRARY) + if (X11_FOUND) add_subdirectory (xdemos) endif (X11_FOUND) diff --git a/src/egl/CMakeLists.txt b/src/egl/CMakeLists.txt new file mode 100644 index 0000000..0318575 --- /dev/null +++ b/src/egl/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(eglut) +add_subdirectory(opengl) \ No newline at end of file diff --git a/src/egl/eglut/CMakeLists.txt b/src/egl/eglut/CMakeLists.txt new file mode 100644 index 0000000..76d48df --- /dev/null +++ b/src/egl/eglut/CMakeLists.txt @@ -0,0 +1,7 @@ +if(X11_FOUND) + add_library(eglut_x11 eglut.h eglut.c eglutint.h eglut_x11.c) + target_link_libraries(eglut_x11 ${OPENGL_gl_LIBRARY}) +endif(X11_FOUND) + +add_library(eglut_screen eglut.h eglut.c eglutint.h eglut_screen.c) +target_link_libraries(eglut_screen ${OPENGL_gl_LIBRARY}) diff --git a/src/egl/opengl/CMakeLists.txt b/src/egl/opengl/CMakeLists.txt new file mode 100644 index 0000000..ede9ec3 --- /dev/null +++ b/src/egl/opengl/CMakeLists.txt @@ -0,0 +1,15 @@ +include_directories(${EGL_INCLUDE_DIR} + ../eglut + ) + +add_executable(eglinfo eglinfo.c) +target_link_libraries(eglinfo ${EGL_egl_LIBRARY}) + +add_executable(eglgears_screen eglgears.c) +target_link_libraries(eglgears_screen ${EGL_egl_LIBRARY} eglut_screen) + +if(X11_FOUND) + add_executable(eglgears_x11 eglgears.c) + target_link_libraries(eglgears_x11 ${EGL_egl_LIBRARY} eglut_x11) +endif(X11_FOUND) + _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
