Fixed CMake for RNA, also removed the aggregate return warning for CMake
[blender.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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 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 SET(DEFSRC
28      rna_action.c
29      rna_actuator.c
30      rna_armature.c
31      rna_brush.c
32      rna_camera.c
33      rna_cloth.c
34      rna_color.c
35      rna_constraint.c
36      rna_controller.c
37      rna_curve.c
38      rna_fluidsim.c
39      rna_group.c
40      rna_ID.c
41      rna_image.c
42      rna_key.c
43      rna_lamp.c
44      rna_lattice.c
45      rna_main.c
46      rna_material.c
47      rna_mesh.c
48      rna_meta.c
49      rna_modifier.c
50      rna_nodetree.c
51      rna_object.c
52      rna_object_force.c
53      rna_packedfile.c
54      rna_particle.c
55      rna_pose.c
56      rna_property.c
57      rna_radio.c
58      rna_rna.c
59      rna_scene.c
60      rna_screen.c
61      rna_scriptlink.c
62      rna_sensor.c
63      rna_sequence.c
64      rna_sound.c
65      rna_space.c
66      rna_text.c
67      rna_texture.c
68      rna_userdef.c
69      rna_vfont.c
70      rna_vpaint.c
71      rna_wm.c
72      rna_world.c)
73
74 STRING(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}")
75
76 SET(SRC
77      makesrna.c
78      rna_define.c
79      ${DEFSRC}
80      ../../../../intern/guardedalloc/intern/mallocn.c
81      ../../../../intern/guardedalloc/intern/mmap_win.c)
82
83 INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../windowmanager .)
84 FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
85
86 # Build makesrna executable
87 ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES})
88 TARGET_LINK_LIBRARIES(makesrna bf_dna)
89
90 # Output rna_*_gen.c
91 ADD_CUSTOM_COMMAND(
92   OUTPUT ${GENSRC}
93   COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesrna ${CMAKE_CURRENT_BINARY_DIR}/
94   DEPENDS makesrna
95 )
96
97 # Build bf_rna
98 SET(SRC rna_access.c rna_dependency.c ${GENSRC})
99 BLENDERLIB(bf_rna "${SRC}" "${INC}")
100
101 MESSAGE(STATUS "Configuring makesrna")
102