Merge branch 'master' into blender2.8
[blender.git] / source / blender / windowmanager / CMakeLists.txt
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # The Original Code is Copyright (C) 2006, Blender Foundation
18 # All rights reserved.
19 #
20 # The Original Code is: all of this file.
21 #
22 # Contributor(s): Jacques Beaurain.
23 #
24 # ***** END GPL LICENSE BLOCK *****
25
26 set(INC
27         .
28         gizmo
29         gizmo/intern
30         ../blenfont
31         ../blenkernel
32         ../blenlib
33         ../blenloader
34         ../blentranslation
35         ../compositor
36         ../depsgraph
37         ../editors/include
38         ../draw
39         ../gpu
40         ../imbuf
41         ../makesdna
42         ../makesrna
43         ../nodes
44         ../render/extern/include
45         ../../../intern/clog
46         ../../../intern/ghost
47         ../../../intern/guardedalloc
48         ../../../intern/glew-mx
49         ../../../intern/memutil
50 )
51
52 set(INC_SYS
53         ${ZLIB_INCLUDE_DIRS}
54         ${GLEW_INCLUDE_PATH}
55 )
56
57 set(SRC
58         intern/wm.c
59         intern/wm_cursors.c
60         intern/wm_dragdrop.c
61         intern/wm_draw.c
62         intern/wm_event_system.c
63         intern/wm_files.c
64         intern/wm_files_link.c
65         intern/wm_gesture.c
66         intern/wm_gesture_ops.c
67         intern/wm_init_exit.c
68         intern/wm_jobs.c
69         intern/wm_keymap.c
70         intern/wm_keymap_utils.c
71         intern/wm_menu_type.c
72         intern/wm_operator_props.c
73         intern/wm_operator_type.c
74         intern/wm_operators.c
75         intern/wm_panel_type.c
76         intern/wm_playanim.c
77         intern/wm_stereo.c
78         intern/wm_subwindow.c
79         intern/wm_toolsystem.c
80         intern/wm_tooltip.c
81         intern/wm_uilist_type.c
82         intern/wm_window.c
83         gizmo/intern/wm_gizmo.c
84         gizmo/intern/wm_gizmo_group.c
85         gizmo/intern/wm_gizmo_group_type.c
86         gizmo/intern/wm_gizmo_map.c
87         gizmo/intern/wm_gizmo_target_props.c
88         gizmo/intern/wm_gizmo_type.c
89         message_bus/intern/wm_message_bus.c
90         message_bus/intern/wm_message_bus_rna.c
91         message_bus/intern/wm_message_bus_static.c
92
93         WM_api.h
94         WM_keymap.h
95         WM_toolsystem.h
96         WM_types.h
97         wm.h
98         wm_cursors.h
99         wm_draw.h
100         wm_event_system.h
101         wm_event_types.h
102         wm_files.h
103         wm_window.h
104         gizmo/WM_gizmo_api.h
105         gizmo/WM_gizmo_types.h
106         gizmo/wm_gizmo_fn.h
107         gizmo/wm_gizmo_wmapi.h
108         gizmo/intern/wm_gizmo_intern.h
109         message_bus/intern/wm_message_bus_intern.h
110         message_bus/wm_message_bus.h
111 )
112
113 if(WITH_AUDASPACE)
114         add_definitions(-DWITH_AUDASPACE)
115
116         list(APPEND INC_SYS
117                 ${AUDASPACE_C_INCLUDE_DIRS}
118         )
119 endif()
120
121 add_definitions(${GL_DEFINITIONS})
122
123 if(WITH_INTERNATIONAL)
124         add_definitions(-DWITH_INTERNATIONAL)
125 endif()
126
127 if(WITH_OPENCOLLADA)
128         add_definitions(-DWITH_COLLADA)
129 endif()
130
131 if(WITH_CODEC_FFMPEG)
132         list(APPEND INC_SYS
133                 ${FFMPEG_INCLUDE_DIRS}
134         )
135         add_definitions(-DWITH_FFMPEG)
136 endif()
137
138 if(WITH_HEADLESS)
139         add_definitions(-DWITH_HEADLESS)
140 elseif(WITH_X11)
141         add_definitions(-DWITH_X11)
142 endif()
143
144 if(WITH_PYTHON)
145         list(APPEND INC
146                 ../python
147         )
148         add_definitions(-DWITH_PYTHON)
149 endif()
150
151 if(WITH_BUILDINFO)
152         add_definitions(-DWITH_BUILDINFO)
153 endif()
154
155 if(WITH_OPENSUBDIV)
156         add_definitions(-DWITH_OPENSUBDIV)
157 endif()
158
159 if(WITH_INPUT_NDOF)
160         add_definitions(-DWITH_INPUT_NDOF)
161 endif()
162
163 if(WIN32)
164         if(WITH_INPUT_IME)
165                 add_definitions(-DWITH_INPUT_IME)
166         endif()
167 endif()
168
169 if(WITH_COMPOSITOR)
170         add_definitions(-DWITH_COMPOSITOR)
171 endif()
172
173 blender_add_lib_nolist(bf_windowmanager "${SRC}" "${INC}" "${INC_SYS}")