8329c28d42e35cf9d027e655f812bb933ff5d93c
[blender-staging.git] / source / blender / makesdna / intern / CMakeLists.txt
1 # $Id$
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 include_directories(../../../../intern/guardedalloc ..)
28
29 # Build makesdna executable
30 set(SRC
31         makesdna.c
32         ../../../../intern/guardedalloc/intern/mallocn.c
33 )
34
35 if(WIN32 AND NOT UNIX)
36         list(APPEND SRC
37                 ../../../../intern/guardedalloc/intern/mmap_win.c
38         )
39 endif()
40
41 set(SRC_DNA_INC
42         ../DNA_ID.h
43         ../DNA_action_types.h
44         ../DNA_actuator_types.h
45         ../DNA_anim_types.h
46         ../DNA_armature_types.h
47         ../DNA_boid_types.h
48         ../DNA_brush_types.h
49         ../DNA_camera_types.h
50         ../DNA_cloth_types.h
51         ../DNA_color_types.h
52         ../DNA_constraint_types.h
53         ../DNA_controller_types.h
54         ../DNA_curve_types.h
55         ../DNA_customdata_types.h
56         ../DNA_documentation.h
57         ../DNA_effect_types.h
58         ../DNA_fileglobal_types.h
59         ../DNA_genfile.h
60         ../DNA_gpencil_types.h
61         ../DNA_group_types.h
62         ../DNA_image_types.h
63         ../DNA_ipo_types.h
64         ../DNA_key_types.h
65         ../DNA_lamp_types.h
66         ../DNA_lattice_types.h
67         ../DNA_listBase.h
68         ../DNA_material_types.h
69         ../DNA_mesh_types.h
70         ../DNA_meshdata_types.h
71         ../DNA_meta_types.h
72         ../DNA_modifier_types.h
73         ../DNA_nla_types.h
74         ../DNA_node_types.h
75         ../DNA_object_fluidsim.h
76         ../DNA_object_force.h
77         ../DNA_object_types.h
78         ../DNA_outliner_types.h
79         ../DNA_packedFile_types.h
80         ../DNA_particle_types.h
81         ../DNA_property_types.h
82         ../DNA_scene_types.h
83         ../DNA_screen_types.h
84         ../DNA_sdna_types.h
85         ../DNA_sensor_types.h
86         ../DNA_sequence_types.h
87         ../DNA_smoke_types.h
88         ../DNA_sound_types.h
89         ../DNA_space_types.h
90         ../DNA_text_types.h
91         ../DNA_texture_types.h
92         ../DNA_userdef_types.h
93         ../DNA_vec_types.h
94         ../DNA_vfont_types.h
95         ../DNA_view2d_types.h
96         ../DNA_view3d_types.h
97         ../DNA_windowmanager_types.h
98         ../DNA_world_types.h
99 )
100
101 add_executable(makesdna ${SRC} ${SRC_DNA_INC})
102
103 # Output dna.c
104 add_custom_command(
105         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
106         COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
107         DEPENDS makesdna
108 )
109
110 # Build bf_dna library
111 set(SRC
112         dna_genfile.c
113         dna.c
114         ${SRC_DNA_INC}
115 )
116
117 blenderlib(bf_dna "${SRC}" "${INC}")
118
119 message(STATUS "Configuring makesdna")