Module: Demos Branch: cmake Commit: b85e4ea36b7c34336d448bde260b63720eaac7f2 URL: http://cgit.freedesktop.org/mesa/demos/commit/?id=b85e4ea36b7c34336d448bde260b63720eaac7f2
Author: José Fonseca <[email protected]> Date: Fri Nov 5 14:32:29 2010 +0000 cmake: Preliminary and incomplete CMake support. CMake has less maintainess overhead than SCons, and in the cases where convenience libraries are not necessary it fits the bill perfectly. CMake is also used by piglit, so it makes it easy if all tests/demos are built the same way. --- CMakeLists.txt | 16 ++++++++++ src/CMakeLists.txt | 2 + src/demos/CMakeLists.txt | 72 ++++++++++++++++++++++++++++++++++++++++++++++ src/util/CMakeLists.txt | 13 ++++++++ 4 files changed, 103 insertions(+), 0 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a58ad3b --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 2.6) + +project (mesademos) + +find_package (OpenGL REQUIRED) +find_package (GLUT REQUIRED) + +FIND_LIBRARY( GLEW_glew_LIBRARY GLEW + /usr/lib +) + +FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h + /usr/include/GL +) + +add_subdirectory (src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..8025523 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory (demos) +add_subdirectory (util) diff --git a/src/demos/CMakeLists.txt b/src/demos/CMakeLists.txt new file mode 100644 index 0000000..63e6b6f --- /dev/null +++ b/src/demos/CMakeLists.txt @@ -0,0 +1,72 @@ +include_directories( + ${mesademos_SOURCE_DIR}/src/util + ${OPENGL_INCLUDE_PATH} + ${GLUT_INCLUDE_DIR} + ${GLEW_INCLUDE_DIR} +) + +link_directories ( + ${mesademos_SOURCE_DIR}/src/util +) + +link_libraries ( + util + ${OPENGL_gl_LIBRARY} + ${OPENGL_glu_LIBRARY} + ${GLUT_glut_LIBRARY} + ${GLEW_glew_LIBRARY} +) + +add_executable(arbfplight arbfplight.c) +add_executable(arbfslight arbfslight.c) +add_executable(arbocclude arbocclude.c) +add_executable(arbocclude2 arbocclude2.c) +add_executable(bounce bounce.c) +add_executable(clearspd clearspd.c) +add_executable(copypix copypix.c) +add_executable(cubemap cubemap.c) +add_executable(dinoshade dinoshade.c) +add_executable(dissolve dissolve.c) +add_executable(drawpix drawpix.c) +add_executable(engine engine.c) +add_executable(fbo_firecube fbo_firecube.c) +add_executable(fbotexture fbotexture.c) +add_executable(fire fire.c) +add_executable(fogcoord fogcoord.c) +add_executable(fplight fplight.c) +add_executable(fslight fslight.c) +add_executable(gamma gamma.c) +add_executable(gearbox gearbox.c) +add_executable(gears gears.c) +add_executable(geartrain geartrain.c) +add_executable(glinfo glinfo.c) +add_executable(gloss gloss.c) +add_executable(gltestperf gltestperf.c) +add_executable(ipers ipers.c) +add_executable(isosurf isosurf.c) +add_executable(lodbias lodbias.c) +add_executable(morph3d morph3d.c) +add_executable(multiarb multiarb.c) +add_executable(paltex paltex.c) +add_executable(pointblast pointblast.c) +add_executable(projtex projtex.c) +add_executable(ray ray.c) +add_executable(readpix readpix.c) +add_executable(reflect reflect.c) +add_executable(renormal renormal.c) +add_executable(shadowtex shadowtex.c) +add_executable(singlebuffer singlebuffer.c) +add_executable(spectex spectex.c) +add_executable(spriteblast spriteblast.c) +add_executable(stex3d stex3d.c) +add_executable(teapot teapot.c) +add_executable(terrain terrain.c) +add_executable(tessdemo tessdemo.c) +add_executable(texcyl texcyl.c) +add_executable(texenv texenv.c) +add_executable(textures textures.c) +add_executable(trispd trispd.c) +add_executable(tunnel2 tunnel2.c) +add_executable(tunnel tunnel.c) +add_executable(vao_demo vao_demo.c) +add_executable(winpos winpos.c) diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt new file mode 100644 index 0000000..9002859 --- /dev/null +++ b/src/util/CMakeLists.txt @@ -0,0 +1,13 @@ +include_directories( + ${mesademos_SOURCE_DIR}/src/util + ${OPENGL_INCLUDE_PATH} + ${GLUT_INCLUDE_DIR} + ${GLEW_INCLUDE_DIR} +) + +add_library (util + readtex.c + shaderutil.c + showbuffer.c + trackball.c +) _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
