Module: Demos
Branch: cmake
Commit: 1703ebf3771a9fb37df7f610feddb71ee26fc39e
URL:    
http://cgit.freedesktop.org/mesa/demos/commit/?id=1703ebf3771a9fb37df7f610feddb71ee26fc39e

Author: José Fonseca <[email protected]>
Date:   Fri Nov  5 19:55:35 2010 +0000

cmake: Cover as many demos as SCons.

---

 CMakeLists.txt             |    4 +
 src/CMakeLists.txt         |   24 +++++-
 src/demos/CMakeLists.txt   |    6 +-
 src/fp/CMakeLists.txt      |   39 +++++++++
 src/fpglsl/CMakeLists.txt  |   32 +++++++
 src/gs/CMakeLists.txt      |   32 +++++++
 src/images/CMakeLists.txt  |    3 +
 src/images/SConscript      |   25 +++++-
 src/perf/CMakeLists.txt    |   37 ++++++++
 src/redbook/:wq            |  103 +++++++++++++++++++++++
 src/redbook/CMakeLists.txt |  103 +++++++++++++++++++++++
 src/samples/CMakeLists.txt |   57 +++++++++++++
 src/tests/CMakeLists.txt   |  141 +++++++++++++++++++++++++++++++
 src/trivial/CMakeLists.txt |  196 ++++++++++++++++++++++++++++++++++++++++++++
 src/vp/CMakeLists.txt      |   32 +++++++
 src/vpglsl/CMakeLists.txt  |   32 +++++++
 src/wgl/CMakeLists.txt     |   13 +++
 src/xdemos/CMakeLists.txt  |   69 +++++++++++++++
 18 files changed, 941 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5fb2577..53ad262 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,13 @@
 cmake_minimum_required (VERSION 2.6)
 
+# Allow targets with duplicate names
+cmake_policy(SET CMP0002 OLD)
+
 project (mesademos)
 
 find_package (OpenGL REQUIRED)
 find_package (GLUT REQUIRED)
+find_package (X11)
 
 find_library (GLEW_glew_LIBRARY GLEW
        /usr/lib
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8025523..d3b7364 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,2 +1,24 @@
-add_subdirectory (demos)
 add_subdirectory (util)
+
+add_subdirectory (demos)
+add_subdirectory (tests)
+add_subdirectory (trivial)
+add_subdirectory (redbook)
+add_subdirectory (samples)
+add_subdirectory (perf)
+
+add_subdirectory (fp)
+add_subdirectory (fpglsl)
+add_subdirectory (vp)
+add_subdirectory (vpglsl)
+add_subdirectory (gs)
+
+if (X11_FOUND)
+       add_subdirectory (xdemos)
+endif (X11_FOUND)
+
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+       add_subdirectory (wgl)
+endif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+
+add_subdirectory (images)
diff --git a/src/demos/CMakeLists.txt b/src/demos/CMakeLists.txt
index 81495cf..26c6dfa 100644
--- a/src/demos/CMakeLists.txt
+++ b/src/demos/CMakeLists.txt
@@ -1,4 +1,4 @@
-include_directories(
+include_directories (
        ${mesademos_SOURCE_DIR}/src/util
        ${OPENGL_INCLUDE_PATH}
        ${GLUT_INCLUDE_DIR}
@@ -79,4 +79,6 @@ endforeach (target)
 
 install (TARGETS ${targets} DESTINATION demos)
 
-install (FILES geartrain.dat isosurf.dat terrain.dat DESTINATION demos)
+file (GLOB data *.dat)
+
+install (FILES ${data} DESTINATION demos)
diff --git a/src/fp/CMakeLists.txt b/src/fp/CMakeLists.txt
new file mode 100644
index 0000000..658ab1c
--- /dev/null
+++ b/src/fp/CMakeLists.txt
@@ -0,0 +1,39 @@
+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}
+)
+
+set (targets
+       fp-tri
+       tri-depth
+       tri-depth2
+       tri-depthwrite
+       tri-depthwrite2
+       tri-param
+       tri-tex
+       point-position
+)
+
+foreach (target ${targets})
+       add_executable (${target} ${target}.c)
+endforeach (target)
+
+install (TARGETS ${targets} DESTINATION fp)
+
+file (GLOB data *.txt)
+
+install (FILES ${data} DESTINATION fp)
diff --git a/src/fpglsl/CMakeLists.txt b/src/fpglsl/CMakeLists.txt
new file mode 100644
index 0000000..3dd9a47
--- /dev/null
+++ b/src/fpglsl/CMakeLists.txt
@@ -0,0 +1,32 @@
+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}
+)
+
+set (targets
+       fp-tri
+)
+
+foreach (target ${targets})
+       add_executable (${target} ${target}.c)
+endforeach (target)
+
+install (TARGETS ${targets} DESTINATION fpglsl)
+
+file (GLOB data *.glsl)
+
+install (FILES ${data} DESTINATION fpglsl)
diff --git a/src/gs/CMakeLists.txt b/src/gs/CMakeLists.txt
new file mode 100644
index 0000000..3ecd4aa
--- /dev/null
+++ b/src/gs/CMakeLists.txt
@@ -0,0 +1,32 @@
+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}
+)
+
+set (targets
+       gs-tri
+)
+
+foreach (target ${targets})
+       add_executable (${target} ${target}.c)
+endforeach (target)
+
+install (TARGETS ${targets} DESTINATION gs)
+
+file (GLOB data *.glsl)
+
+install (FILES ${data} DESTINATION gs)
diff --git a/src/images/CMakeLists.txt b/src/images/CMakeLists.txt
new file mode 100644
index 0000000..5bcd4f2
--- /dev/null
+++ b/src/images/CMakeLists.txt
@@ -0,0 +1,3 @@
+file (GLOB data *.rgb *.rgba)
+
+install (FILES ${data} DESTINATION images)
diff --git a/src/images/SConscript b/src/images/SConscript
index ab1852b..abf9fc8 100644
--- a/src/images/SConscript
+++ b/src/images/SConscript
@@ -1,10 +1,27 @@
 Import('*')
 
-images = env.Glob('*.rgb') + env.Glob('*.rgba')
+progs = [
+    'fp-tri',
+    'tri-depth',
+    'tri-depth2',
+    'tri-depthwrite',
+    'tri-depthwrite2',
+    'tri-param',
+    'tri-tex',
+    'point-position',
+]
 
-for image in images:
+for prog in progs:
+    progs_env.Program(
+        target = prog,
+        source = [prog + '.c'],
+    )
+
+shaders = env.Glob('*.txt')
+
+for shader in shaders:
     env.Command(
-        target = image,
-        source = image.srcnode(),
+        target = shader,
+        source = shader.srcnode(),
         action = [Copy('$TARGET', '$SOURCE')],
     )
diff --git a/src/perf/CMakeLists.txt b/src/perf/CMakeLists.txt
new file mode 100644
index 0000000..a3754ed
--- /dev/null
+++ b/src/perf/CMakeLists.txt
@@ -0,0 +1,37 @@
+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}
+)
+
+set (targets
+       copytex
+       drawoverhead
+       fbobind
+       fill
+       genmipmap
+       readpixels
+       swapbuffers
+       teximage
+       vbo
+       vertexrate
+)
+
+foreach (target ${targets})
+       add_executable (${target} ${target}.c common.c glmain.c)
+endforeach (target)
+
+install (TARGETS ${targets} DESTINATION perf)
diff --git a/src/redbook/:wq b/src/redbook/:wq
new file mode 100644
index 0000000..9a4b4f7
--- /dev/null
+++ b/src/redbook/:wq
@@ -0,0 +1,103 @@
+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}
+)
+
+set (targets
+       aaindex
+       aapoly
+       aargb
+       accanti
+       accpersp
+       alpha3D
+       alpha
+       anti
+       bezcurve
+       bezmesh
+       checker
+       clip
+       colormat
+       combiner
+       convolution
+       cube
+       cubemap
+       depthcue
+       dof
+       double
+       drawf
+       feedback
+       fog
+       fogcoord
+       fogindex
+       font
+       hello
+       histogram
+       image
+       light
+       lines
+       list
+       material
+       minmax
+       mipmap
+       model
+       movelight
+       multisamp
+       multitex
+       mvarray
+       nurbs
+       pickdepth
+       picksquare
+       plane
+       planet
+       pointp
+       polyoff
+       polys
+       quadric
+       robot
+       sccolorlight
+       scenebamb
+       scene
+       sceneflat
+       select
+       shadowmap
+       smooth
+       stencil
+       stroke
+       surface
+       surfpoints
+       teaambient
+       teapots
+       tess
+       tesswind
+       texbind
+       texgen
+       texprox
+       texsub
+       texture3d
+       texturesurf
+       torus
+       trim
+       unproject
+       varray
+       wrap
+)
+
+foreach (target ${targets})
+       add_executable (${target} ${target}.c)
+endforeach (target)
+
+install (TARGETS ${targets} DESTINATION demos)
diff --git a/src/redbook/CMakeLists.txt b/src/redbook/CMakeLists.txt
new file mode 100644
index 0000000..8b84913
--- /dev/null
+++ b/src/redbook/CMakeLists.txt
@@ -0,0 +1,103 @@
+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}
+)
+
+set (targets
+       aaindex
+       aapoly
+       aargb
+       accanti
+       accpersp
+       alpha3D
+       alpha
+       anti
+       bezcurve
+       bezmesh
+       checker
+       clip
+       colormat
+       combiner
+       convolution
+       cube
+       cubemap
+       depthcue
+       dof
+       double
+       drawf
+       feedback
+       fog
+       fogcoord
+       fogindex
+       font
+       hello
+       histogram
+       image
+       light
+       lines
+       list
+       material
+       minmax
+       mipmap
+       model
+       movelight
+       multisamp
+       multitex
+       mvarray
+       nurbs
+       pickdepth
+       picksquare
+       plane
+       planet
+       pointp
+       polyoff
+       polys
+       quadric
+       robot
+       sccolorlight
+       scenebamb
+       scene
+       sceneflat
+       select
+       shadowmap
+       smooth
+       stencil
+       stroke
+       surface
+       surfpoints
+       teaambient
+       teapots
+       tess
+       tesswind
+       texbind
+       texgen
+       texprox
+       texsub
+       texture3d
+       texturesurf
+       torus
+       trim
+       unproject
+       varray
+       wrap
+)
+
+foreach (target ${targets})
+       add_executable (${target} ${target}.c)
+endforeach (target)
+
+install (TARGETS ${targets} DESTINATION redbook)
diff --git a/src/samples/CMakeLists.txt b/src/samples/CMakeLists.txt
new file mode 100644
index 0000000..9fb9f46
--- /dev/null
+++ b/src/samples/CMakeLists.txt
@@ -0,0 +1,57 @@
+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}
+)
+
+set (targets
+       accum
+       bitmap1
+       bitmap2
+       blendeq
+       blendxor
+       copy
+       cursor
+       depth
+       eval
+       fog
+       font
+       line
+       logo
+       nurb
+       oglinfo
+       olympic
+       overlay
+       point
+       prim
+       quad
+       rgbtoppm
+       select
+       shape
+       sphere
+       star
+       stencil
+       stretch
+       texture
+       tri
+       wave
+)
+
+foreach (target ${targets})
+       add_executable (${target} ${target}.c)
+endforeach (target)
+
+install (TARGETS ${targets} DESTINATION samples)
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
new file mode 100644
index 0000000..a7f4423
--- /dev/null
+++ b/src/tests/CMakeLists.txt
@@ -0,0 +1,141 @@
+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}
+)
+
+set (targets
+       afsmultiarb
+       antialias
+       # XXX: Requires Linux kernel headers???
+       #api_speed 
+       arbfpspec
+       arbfptest1
+       arbfptexture
+       arbfptrig
+       arbgpuprog
+       arbnpot
+       arbnpot-mipmap
+       arbvptest1
+       arbvptest3
+       arbvptorus
+       arbvpwarpmesh
+       arraytexture
+       auxbuffer
+       blendxor
+       blitfb
+       bufferobj
+       bug_3050
+       bug_3101
+       bug_3195
+       bug_texstore_i8
+       bumpmap
+       calibrate_rast
+       condrender
+       copypixrate
+       cva
+       cva_huge
+       cylwrap
+       # XXX: Depends on Mesa GL header
+       #debugger
+       drawbuffers2
+       drawbuffers
+       exactrast
+       ext422square
+       fbotest1
+       fbotest2
+       fbotest3
+       fillrate
+       floattex
+       fog
+       fogcoord
+       fptest1
+       fptexture
+       # XXX: Requires Mesa source
+       #getprocaddress
+       getteximage
+       glutfx
+       interleave
+       invert
+       jkrahntest
+       lineclip
+       manytex
+       mapbufrange
+       minmag
+       mipgen
+       mipmap_comp
+       mipmap_comp_tests
+       mipmap_limits
+       mipmap_tunnel
+       mipmap_view
+       multipal
+       multitexarray
+       multiwindow
+       no_s3tc
+       occlude
+       packedpixels
+       pbo
+       persp_hint
+       prim
+       prog_parameter
+       quads
+       random
+       readrate
+       rubberband
+       scissor
+       scissor-viewport
+       seccolor
+       shader_api
+       sharedtex
+       stencilreaddraw
+       stencilwrap
+       streaming_rect
+       subtex
+       subtexrate
+       tex1d
+       texcmp
+       texcompress2
+       texcompsub
+       texdown
+       texfilt
+       texgenmix
+       texleak
+       texline
+       texobj
+       texobjshare
+       texrect
+       texwrap
+       unfilledclip
+       vparray
+       vpeval
+       vptest1
+       vptest2
+       vptest3
+       vptorus
+       vpwarpmesh
+       yuvrect
+       yuvsquare
+       zbitmap
+       zcomp
+       zdrawpix
+       zreaddraw
+)
+
+foreach (target ${targets})
+       add_executable (${target} ${target}.c)
+endforeach (target)
+
+install (TARGETS ${targets} DESTINATION tests)
diff --git a/src/trivial/CMakeLists.txt b/src/trivial/CMakeLists.txt
new file mode 100644
index 0000000..8af7b30
--- /dev/null
+++ b/src/trivial/CMakeLists.txt
@@ -0,0 +1,196 @@
+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}
+)
+
+set (targets
+       clear-color
+       clear-fbo
+       clear-fbo-scissor
+       clear-fbo-tex
+       clear-random
+       clear-repeat
+       clear-scissor
+       clear-undefined
+       createwin
+       dlist-begin-call-end
+       dlist-dangling
+       dlist-degenerate
+       dlist-edgeflag
+       dlist-edgeflag-dangling
+       dlist-flat-tri
+       dlist-mat-tri
+       dlist-recursive-call
+       dlist-tri-flat-tri
+       dlist-tri-mat-tri
+       draw2arrays
+       drawarrays
+       drawelements
+       drawelements-large
+       drawrange
+       flat-clip
+       fs-tri
+       line
+       line-clip
+       line-cull
+       line-flat
+       lineloop
+       lineloop-clip
+       lineloop-elts
+       line-smooth
+       line-stipple-wide
+       linestrip
+       linestrip-clip
+       linestrip-flat-stipple
+       linestrip-stipple
+       linestrip-stipple-wide
+       line-userclip
+       line-userclip-clip
+       line-userclip-nop
+       line-userclip-nop-clip
+       line-wide
+       line-xor
+       long-fixed-func
+       pgon-mode
+       point
+       point-clip
+       point-param
+       point-sprite
+       point-wide
+       point-wide-smooth
+       poly
+       poly-flat
+       poly-flat-clip
+       poly-flat-unfilled-clip
+       poly-unfilled
+       quad
+       quad-clip-all-vertices
+       quad-clip
+       quad-clip-nearplane
+       quad-degenerate
+       quad-flat
+       quad-offset-factor
+       quad-offset-unfilled
+       quad-offset-units
+       quads
+       quadstrip
+       quadstrip-clip
+       quadstrip-cont
+       quadstrip-flat
+       quad-tex-2d
+       quad-tex-3d
+       quad-tex-alpha
+       quad-tex-pbo
+       quad-tex-sub
+       quad-unfilled
+       quad-unfilled-clip
+       quad-unfilled-stipple
+       readpixels
+       sub-tex
+       tex-quads
+       tri-alpha
+       tri-alpha-tex
+       tri-array-interleaved
+       tri-blend
+       tri-blend-color
+       tri-blend-max
+       tri-blend-min
+       tri-blend-revsub
+       tri-blend-sub
+       tri
+       tri-clear
+       tri-clip
+       tri-cull-both
+       tri-cull
+       tri-dlist
+       tri-edgeflag-array
+       tri-edgeflag
+       trifan
+       trifan-flat
+       trifan-flat-clip
+       trifan-flat-unfilled-clip
+       trifan-unfilled
+       tri-fbo
+       tri-fbo-tex
+       tri-fbo-tex-mip
+       tri-flat
+       tri-flat-clip
+       tri-fog
+       tri-fp
+       tri-fp-const-imm
+       tri-lit
+       tri-lit-material
+       tri-logicop-none
+       tri-logicop-xor
+       tri-mask-tri
+       tri-multitex-vbo
+       tri-orig
+       tri-point-line-clipped
+       tri-query
+       tri-repeat
+       tri-scissor-tri
+       tri-square
+       tri-stencil
+       tri-stipple
+       tristrip
+       tristrip-clip
+       tristrip-flat
+       tri-tex-1d
+       tri-tex-3d
+       tri-tex
+       tri-tri
+       tri-unfilled
+       tri-unfilled-clip
+       tri-unfilled-edgeflag
+       tri-unfilled-fog
+       tri-unfilled-point
+       tri-unfilled-smooth
+       tri-unfilled-tri
+       tri-unfilled-tri-lit
+       tri-unfilled-userclip
+       tri-unfilled-userclip-stip
+       tri-userclip
+       tri-viewport
+       tri-z-9
+       tri-z
+       tri-z-eq
+       vbo-drawarrays
+       vbo-drawelements
+       vbo-drawrange
+       vbo-noninterleaved
+       vbo-tri
+       vp-array
+       vp-array-hf
+       vp-array-int
+       vp-clip
+       vp-line-clip
+       vp-tri
+       vp-tri-cb
+       vp-tri-cb-pos
+       vp-tri-cb-tex
+       vp-tri-imm
+       vp-tri-invariant
+       vp-tri-swap
+       vp-tri-tex
+       vp-unfilled
+)
+
+foreach (target ${targets})
+       add_executable (${target} ${target}.c)
+endforeach (target)
+
+install (TARGETS ${targets} DESTINATION trivial)
diff --git a/src/vp/CMakeLists.txt b/src/vp/CMakeLists.txt
new file mode 100644
index 0000000..e83c704
--- /dev/null
+++ b/src/vp/CMakeLists.txt
@@ -0,0 +1,32 @@
+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}
+)
+
+set (targets
+       vp-tris
+)
+
+foreach (target ${targets})
+       add_executable (${target} ${target}.c)
+endforeach (target)
+
+install (TARGETS ${targets} DESTINATION vp)
+
+file (GLOB data *.txt)
+
+install (FILES ${data} DESTINATION vp)
diff --git a/src/vpglsl/CMakeLists.txt b/src/vpglsl/CMakeLists.txt
new file mode 100644
index 0000000..72b9fd1
--- /dev/null
+++ b/src/vpglsl/CMakeLists.txt
@@ -0,0 +1,32 @@
+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}
+)
+
+set (targets
+       vp-tris
+)
+
+foreach (target ${targets})
+       add_executable (${target} ${target}.c)
+endforeach (target)
+
+install (TARGETS ${targets} DESTINATION vpglsl)
+
+file (GLOB data *.glsl)
+
+install (FILES ${data} DESTINATION vpglsl)
diff --git a/src/wgl/CMakeLists.txt b/src/wgl/CMakeLists.txt
new file mode 100644
index 0000000..58df56d
--- /dev/null
+++ b/src/wgl/CMakeLists.txt
@@ -0,0 +1,13 @@
+include_directories (
+       ${OPENGL_INCLUDE_PATH}
+)
+
+link_libraries (
+       ${OPENGL_gl_LIBRARY}
+)
+
+add_executable (wglthreads wglthreads/wglthreads.c)
+add_executable (sharedtex_mt sharedtex_mt/sharedtex_mt.c)
+add_executable (wglinfo wglinfo.c)
+
+install (TARGETS wglthreads sharedtex_mt wglthreads DESTINATION wgl)
diff --git a/src/xdemos/CMakeLists.txt b/src/xdemos/CMakeLists.txt
new file mode 100644
index 0000000..73e6406
--- /dev/null
+++ b/src/xdemos/CMakeLists.txt
@@ -0,0 +1,69 @@
+include_directories (
+       ${mesademos_SOURCE_DIR}/src/util
+       ${OPENGL_INCLUDE_PATH}
+       ${X11_INCLUDE_DIR}
+       ${GLEW_INCLUDE_DIR}
+)
+
+link_directories (
+       ${mesademos_SOURCE_DIR}/src/util
+)
+
+link_libraries (
+       util
+       ${OPENGL_gl_LIBRARY}
+       ${OPENGL_glu_LIBRARY}
+       ${X11_X11_LIBRARY}
+       ${GLEW_glew_LIBRARY}
+)
+
+add_library (pbutil pbutil.c)
+
+set (targets
+       glsync
+       glthreads
+       glxcontexts
+       glxdemo
+       glxgears
+       glxgears_fbconfig
+       glxgears_pixmap
+       glxheads
+       glxinfo
+       glxpbdemo
+       glxpixmap
+       glxsnoop
+       glxswapcontrol
+       manywin
+       msctest
+       multictx
+       offset
+       omlsync
+       opencloseopen
+       overlay
+       pbdemo
+       pbinfo
+       shape
+       sharedtex
+       sharedtex_mt
+       texture_from_pixmap
+       wincopy
+       # XXX: Requires xmesa.h
+       #xdemo
+       xfont
+       yuvrect_client
+)
+
+foreach (target ${targets})
+       add_executable (${target} ${target}.c)
+endforeach (target)
+
+target_link_libraries (glthreads pthread)
+target_link_libraries (glxgears_fbconfig pbutil)
+target_link_libraries (pbdemo pbutil)
+target_link_libraries (pbinfo pbutil)
+target_link_libraries (sharedtex_mt pthread)
+
+add_executable (corender corender.c ipc.c) 
+add_executable (xrotfontdemo xrotfontdemo.c xuserotfont.c)
+
+install (TARGETS ${targets} corender xrotfontdemo DESTINATION xdemos)

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to