Merge branch 'master' into blender2.8
[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         ../../../intern/atomic
41         ../../../intern/guardedalloc
42         ../../../intern/mikktspace
43         ../../../intern/smoke/extern
44 )
45
46 set(INC_SYS
47
48 )
49
50 set(SRC
51         intern/source/bake_api.c
52         intern/source/external_engine.c
53         intern/source/imagetexture.c
54         intern/source/initrender.c
55         intern/source/multires_bake.c
56         intern/source/pipeline.c
57         intern/source/pointdensity.c
58         intern/source/render_result.c
59         intern/source/render_texture.c
60         intern/source/zbuf.c
61
62         extern/include/RE_engine.h
63         extern/include/RE_bake.h
64         extern/include/RE_multires_bake.h
65         extern/include/RE_pipeline.h
66         extern/include/RE_render_ext.h
67         extern/include/RE_shader_ext.h
68         intern/include/initrender.h
69         intern/include/render_types.h
70         intern/include/render_result.h
71         intern/include/renderpipeline.h
72         intern/include/texture.h
73         intern/include/zbuf.h
74 )
75
76 if(WITH_PYTHON)
77         add_definitions(-DWITH_PYTHON)
78         list(APPEND INC
79                 ../python
80         )
81 endif()
82
83 if(WITH_IMAGE_OPENEXR)
84         add_definitions(-DWITH_OPENEXR)
85 endif()
86
87 if(WITH_MOD_SMOKE)
88         add_definitions(-DWITH_SMOKE)
89 endif()
90
91 if(WITH_FREESTYLE)
92         list(APPEND INC
93                 ../freestyle
94         )
95         add_definitions(-DWITH_FREESTYLE)
96 endif()
97
98 if(WITH_INTERNATIONAL)
99         add_definitions(-DWITH_INTERNATIONAL)
100 endif()
101
102 if(APPLE)
103         # SSE math is enabled by default on x86_64
104         if(CMAKE_OSX_ARCHITECTURES MATCHES "i386")
105                 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mfpmath=sse")
106                 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpmath=sse")
107         endif()
108 endif()
109
110 blender_add_lib_nolist(bf_render "${SRC}" "${INC}" "${INC_SYS}")