Merge branch 'blender2.7'
[blender.git] / source / blender / render / CMakeLists.txt
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # The Original Code is Copyright (C) 2006, Blender Foundation
18 # All rights reserved.
19 #
20 # The Original Code is: all of this file.
21 #
22 # Contributor(s): Jacques Beaurain.
23 #
24 # ***** END GPL LICENSE BLOCK *****
25
26
27 set(INC
28         extern/include
29         intern/include
30         ../blenkernel
31         ../blenlib
32         ../blentranslation
33         ../imbuf
34         ../depsgraph
35         ../makesdna
36         ../makesrna
37         ../nodes
38         ../physics
39         ../draw
40         ../gpu
41         ../../../intern/atomic
42         ../../../intern/guardedalloc
43         ../../../intern/mikktspace
44         ../../../intern/smoke/extern
45 )
46
47 set(INC_SYS
48         ${GLEW_INCLUDE_PATH}
49 )
50
51 set(SRC
52         intern/source/bake_api.c
53         intern/source/external_engine.c
54         intern/source/imagetexture.c
55         intern/source/initrender.c
56         intern/source/multires_bake.c
57         intern/source/pipeline.c
58         intern/source/pointdensity.c
59         intern/source/render_result.c
60         intern/source/render_texture.c
61         intern/source/zbuf.c
62
63         extern/include/RE_bake.h
64         extern/include/RE_engine.h
65         extern/include/RE_multires_bake.h
66         extern/include/RE_pipeline.h
67         extern/include/RE_render_ext.h
68         extern/include/RE_shader_ext.h
69         intern/include/initrender.h
70         intern/include/render_result.h
71         intern/include/render_types.h
72         intern/include/renderpipeline.h
73         intern/include/texture.h
74         intern/include/zbuf.h
75 )
76
77 if(WITH_PYTHON)
78         add_definitions(-DWITH_PYTHON)
79         list(APPEND INC
80                 ../python
81         )
82 endif()
83
84 if(WITH_IMAGE_OPENEXR)
85         add_definitions(-DWITH_OPENEXR)
86 endif()
87
88 if(WITH_MOD_SMOKE)
89         add_definitions(-DWITH_SMOKE)
90 endif()
91
92 if(WITH_FREESTYLE)
93         list(APPEND INC
94                 ../freestyle
95         )
96         add_definitions(-DWITH_FREESTYLE)
97 endif()
98
99 if(WITH_INTERNATIONAL)
100         add_definitions(-DWITH_INTERNATIONAL)
101 endif()
102
103 if(APPLE)
104         # SSE math is enabled by default on x86_64
105         if(CMAKE_OSX_ARCHITECTURES MATCHES "i386")
106                 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mfpmath=sse")
107                 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpmath=sse")
108         endif()
109 endif()
110
111 blender_add_lib_nolist(bf_render "${SRC}" "${INC}" "${INC_SYS}")