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