cmake: Allow to specify glext headers include path.
[mesa-demos.git] / src / samples / CMakeLists.txt
blob978f769b35cb6d045fc4730ea1464ae7887cdcf6
1 include_directories (
2         ${CMAKE_SOURCE_DIR}/src/util
3         ${GLEXT_INCLUDE_DIR}
4         ${OPENGL_INCLUDE_PATH}
5         ${GLUT_INCLUDE_DIR}
6         ${GLEW_INCLUDE_DIR}
9 link_directories (
10         ${CMAKE_SOURCE_DIR}/src/util
13 link_libraries (
14         util
17 set (subdir samples)
19 set (targets
20         accum
21         bitmap1
22         bitmap2
23         blendeq
24         blendxor
25         copy
26         cursor
27         depth
28         eval
29         fog
30         font
31         line
32         logo
33         nurb
34         olympic
35         overlay
36         point
37         prim
38         quad
39         rgbtoppm
40         select
41         shape
42         sphere
43         star
44         stencil
45         stretch
46         texture
47         tri
48         wave
51 foreach (target ${targets})
52         add_executable (${subdir}_${target} ${target}.c)
53         set_target_properties (${subdir}_${target} PROPERTIES OUTPUT_NAME ${target})
54         target_link_libraries (${subdir}_${target}
55                 ${OPENGL_gl_LIBRARY}
56                 ${OPENGL_glu_LIBRARY}
57                 ${GLUT_glut_LIBRARY}
58                 ${GLEW_glew_LIBRARY}
59         )
60         install (TARGETS ${subdir}_${target} DESTINATION ${subdir})
61 endforeach (target)
63 if (X11_FOUND)
64         include_directories (
65                 ${X11_INCLUDE_DIR}
66         )
68         set (targets
69                 oglinfo
70         )
72         foreach (target ${targets})
73                 add_executable (${subdir}_${target} ${target}.c)
74                 set_target_properties (${subdir}_${target} PROPERTIES OUTPUT_NAME ${target})
75                 target_link_libraries (${subdir}_${target}
76                         ${X11_GLU_LIB}
77                         ${X11_GL_LIB}
78                         ${X11_Xext_LIB}
79                         ${X11_X11_LIB}
80                 )
81                 install (TARGETS ${subdir}_${target} DESTINATION ${subdir})
82         endforeach (target)
83 endif (X11_FOUND)