This option limits visibility of the glew.h header to just bf_gpu and intern_gawain
[blender.git] / intern / gawain / CMakeLists.txt
1 # WITH_OPENGL limits the visibility of the opengl headers to just gawain and bg_gpu,
2 # to more easily highlight codepadths in other libraries that need to be refactored, 
3 # bf_intern_gawain is allowed to have opengl regardless of this option.
4
5 if(NOT WITH_OPENGL)
6         add_definitions(-DWITH_OPENGL)
7 endif()
8
9 set(INC
10         gawain
11 )
12
13 set(INC_SYS
14         ${GLEW_INCLUDE_PATH}
15 )
16
17 set(SRC
18         src/gwn_attr_binding.c
19         src/gwn_batch.c
20         src/gwn_element.c
21         src/gwn_buffer_id.cpp
22         src/gwn_immediate.c
23         src/gwn_imm_util.c
24         src/gwn_primitive.c
25         src/gwn_shader_interface.c
26         src/gwn_vertex_array_id.cpp
27         src/gwn_vertex_buffer.c
28         src/gwn_vertex_format.c
29
30         gawain/gwn_attr_binding.h
31         gawain/gwn_attr_binding_private.h
32         gawain/gwn_batch.h
33         gawain/gwn_batch_private.h
34         gawain/gwn_buffer_id.h
35         gawain/gwn_common.h
36         gawain/gwn_element.h
37         gawain/gwn_imm_util.h
38         gawain/gwn_immediate.h
39         gawain/gwn_primitive.h
40         gawain/gwn_primitive_private.h
41         gawain/gwn_shader_interface.h
42         gawain/gwn_vertex_array_id.h
43         gawain/gwn_vertex_buffer.h
44         gawain/gwn_vertex_format.h
45         gawain/gwn_vertex_format_private.h
46 )
47
48 add_definitions(${GL_DEFINITIONS})
49
50 blender_add_lib(bf_intern_gawain "${SRC}" "${INC}" "${INC_SYS}")