Made a change as to when the view map data structure is released,
[blender-staging.git] / source / blender / makesrna / intern / CMakeLists.txt
1 # $Id: CMakeLists.txt 17433 2008-11-12 21:16:53Z blendix $
2 # ***** BEGIN GPL LICENSE BLOCK *****
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18 # The Original Code is Copyright (C) 2006, Blender Foundation
19 # All rights reserved.
20 #
21 # The Original Code is: all of this file.
22 #
23 # Contributor(s): Jacques Beaurain.
24 #
25 # ***** END GPL LICENSE BLOCK *****
26
27 # Generated code has some unused vars we can ignore.
28 REMOVE_STRICT_FLAGS()
29
30 MESSAGE(STATUS "Configuring makesrna")
31
32 FILE(GLOB DEFSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
33 FILE(GLOB APISRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*_api.c")
34 LIST(REMOVE_ITEM DEFSRC rna_access.c rna_define.c makesrna.c)
35 LIST(REMOVE_ITEM DEFSRC ${APISRC})
36  
37 STRING(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}")
38 SET_SOURCE_FILES_PROPERTIES(GENSRC PROPERTIES GENERATED true)
39
40
41 SET(SRC
42         makesrna.c
43         rna_define.c
44         ${DEFSRC}
45         ${APISRC}
46         ../../../../intern/guardedalloc/intern/mallocn.c
47         ../../../../intern/guardedalloc/intern/mmap_win.c)
48
49 INCLUDE_DIRECTORIES(
50         ../../../../intern/audaspace/intern
51         ../../../../intern/guardedalloc
52         ../../../../intern/memutil
53         ..
54         ../../makesdna
55         ../../blenkernel
56         ../../blenlib
57         ../../blenfont
58         ../../ikplugin
59         ../../windowmanager
60         ../../editors/include
61         ../../gpu
62         ../../imbuf
63         ../../render/extern/include
64         ../../../../extern/glew/include
65         ../../freestyle
66         . )
67
68 FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
69
70 IF(WITH_PYTHON)
71         ADD_DEFINITIONS(-DWITH_PYTHON)
72 ENDIF(WITH_PYTHON)
73
74 IF(WITH_GAMEENGINE)
75         ADD_DEFINITIONS(-DWITH_GAMEENGINE)
76 ENDIF(WITH_GAMEENGINE)
77
78 IF(WITH_IMAGE_OPENEXR)
79         ADD_DEFINITIONS(-DWITH_OPENEXR)
80 ENDIF(WITH_IMAGE_OPENEXR)
81
82 IF(WITH_IMAGE_TIFF)
83         ADD_DEFINITIONS(-DWITH_TIFF)
84 ENDIF(WITH_IMAGE_TIFF)
85
86 IF(WITH_IMAGE_OPENJPEG)
87         ADD_DEFINITIONS(-DWITH_OPENJPEG)
88 ENDIF(WITH_IMAGE_OPENJPEG)
89
90 IF(WITH_IMAGE_DDS)
91         ADD_DEFINITIONS(-DWITH_DDS)
92 ENDIF(WITH_IMAGE_DDS)
93
94 IF(WITH_IMAGE_CINEON)
95         ADD_DEFINITIONS(-DWITH_CINEON)
96 ENDIF(WITH_IMAGE_CINEON)
97
98 IF(WITH_IMAGE_HDR)
99         ADD_DEFINITIONS(-DWITH_HDR)
100 ENDIF(WITH_IMAGE_HDR)
101
102 IF(WITH_QUICKTIME)
103         LIST(APPEND INC ../../quicktime)
104         ADD_DEFINITIONS(-DWITH_QUICKTIME)
105 ENDIF(WITH_QUICKTIME)
106
107 IF(WITH_FFMPEG)
108         LIST(APPEND INC ${FFMPEG_INC})
109         ADD_DEFINITIONS(-DWITH_FFMPEG)
110 ENDIF(WITH_FFMPEG)
111
112 IF(WITH_LCMS)
113         LIST(APPEND INC ${LCMS_INCLUDE_DIR})
114         ADD_DEFINITIONS(-DWITH_LCMS)
115 ENDIF(WITH_LCMS)
116
117 IF(NOT WITH_MOD_FLUID)
118         ADD_DEFINITIONS(-DDISABLE_ELBEEM)
119 ENDIF(NOT WITH_MOD_FLUID)
120
121 IF(WITH_FFTW3)
122         ADD_DEFINITIONS(-DFFTW3=1)
123 ENDIF(WITH_FFTW3)
124
125 IF(WITH_SDL)
126         ADD_DEFINITIONS(-DWITH_SDL)
127 ENDIF(WITH_SDL)
128
129 IF(WITH_OPENAL)
130         ADD_DEFINITIONS(-DWITH_OPENAL)
131 ENDIF(WITH_OPENAL)
132
133 IF(WITH_JACK)
134         ADD_DEFINITIONS(-DWITH_JACK)
135 ENDIF(WITH_JACK)
136
137 IF(WITH_OPENCOLLADA)
138         ADD_DEFINITIONS(-DWITH_COLLADA)
139 ENDIF(WITH_OPENCOLLADA)
140
141 # Build makesrna executable
142 ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES})
143 TARGET_LINK_LIBRARIES(makesrna bf_dna)
144
145 # Output rna_*_gen.c
146 # note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes
147 ADD_CUSTOM_COMMAND(
148         OUTPUT ${GENSRC}
149         COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesrna ${CMAKE_CURRENT_BINARY_DIR}/
150         DEPENDS makesrna
151 )
152
153 # Build bf_rna
154 SET(SRC rna_access.c ${GENSRC})
155 BLENDERLIB(bf_rna "${SRC}" "${INC}")