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