ToDo: long outstanding patch to allow access to system paths in background mode
[blender.git] / intern / ghost / 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 set(INC
28         .
29         ../string
30         ../../extern/glew/include
31         ../../source/blender/imbuf
32         ../../source/blender/makesdna
33 )
34
35 set(SRC
36         intern/GHOST_Buttons.cpp
37         intern/GHOST_CallbackEventConsumer.cpp
38         intern/GHOST_C-api.cpp
39         intern/GHOST_Path-api.cpp
40         intern/GHOST_DisplayManager.cpp
41         intern/GHOST_EventManager.cpp
42         intern/GHOST_EventPrinter.cpp
43         intern/GHOST_ISystem.cpp
44         intern/GHOST_ISystemPaths.cpp
45         intern/GHOST_ModifierKeys.cpp
46         intern/GHOST_NDOFManager.cpp
47         intern/GHOST_Path-api.cpp
48         intern/GHOST_Rect.cpp
49         intern/GHOST_System.cpp
50         intern/GHOST_TimerManager.cpp
51         intern/GHOST_Window.cpp
52         intern/GHOST_WindowManager.cpp
53
54         GHOST_C-api.h
55         GHOST_IEvent.h
56         GHOST_IEventConsumer.h
57         GHOST_ISystem.h
58         GHOST_ITimerTask.h
59         GHOST_IWindow.h
60         GHOST_Path-api.h
61         GHOST_Rect.h
62         GHOST_Types.h
63         intern/GHOST_Buttons.h
64         intern/GHOST_CallbackEventConsumer.h
65         intern/GHOST_Debug.h
66         intern/GHOST_DisplayManager.h
67         intern/GHOST_Event.h
68         intern/GHOST_EventButton.h
69         intern/GHOST_EventCursor.h
70         intern/GHOST_EventDragnDrop.h
71         intern/GHOST_EventKey.h
72         intern/GHOST_EventManager.h
73         intern/GHOST_EventNDOF.h
74         intern/GHOST_EventPrinter.h
75         intern/GHOST_EventString.h
76         intern/GHOST_EventTrackpad.h
77         intern/GHOST_EventWheel.h
78         intern/GHOST_ModifierKeys.h
79         intern/GHOST_NDOFManager.h
80         intern/GHOST_System.h
81         intern/GHOST_TimerManager.h
82         intern/GHOST_TimerTask.h
83         intern/GHOST_Window.h
84         intern/GHOST_WindowManager.h
85 )
86
87 if(APPLE)
88         if(WITH_COCOA)
89                 list(APPEND SRC
90                         intern/GHOST_DisplayManagerCocoa.mm
91                         intern/GHOST_SystemCocoa.mm
92                         intern/GHOST_SystemPathsCocoa.mm
93                         intern/GHOST_WindowCocoa.mm
94                         
95                         intern/GHOST_DisplayManagerCocoa.h
96                         intern/GHOST_SystemCocoa.h
97                         intern/GHOST_SystemPathsCocoa.h
98                         intern/GHOST_WindowCocoa.h
99                 )
100         else()
101                 list(APPEND SRC
102                         intern/GHOST_DisplayManagerCarbon.cpp
103                         intern/GHOST_SystemCarbon.cpp
104                         intern/GHOST_SystemPathsCarbon.cpp
105                         intern/GHOST_WindowCarbon.cpp
106
107                         intern/GHOST_DisplayManagerCarbon.h
108                         intern/GHOST_SystemCarbon.h
109                         intern/GHOST_SystemPathsCarbon.h
110                         intern/GHOST_WindowCarbon.h
111                 )
112         endif()
113
114         if(WITH_CODEC_QUICKTIME)
115                 add_definitions(-DWITH_QUICKTIME)
116         endif()
117
118 elseif(UNIX)
119         list(APPEND INC ${X11_X11_INCLUDE_PATH})
120
121         list(APPEND SRC
122                 intern/GHOST_DisplayManagerX11.cpp
123                 intern/GHOST_SystemX11.cpp
124                 intern/GHOST_SystemPathsX11.cpp
125                 intern/GHOST_WindowX11.cpp
126
127                 intern/GHOST_DisplayManagerX11.h
128                 intern/GHOST_SystemX11.h
129                 intern/GHOST_SystemPathsX11.h
130                 intern/GHOST_WindowX11.h
131         )
132
133         add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
134
135 elseif(WIN32)
136         if(MSVC)
137                 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
138         endif()
139
140         list(APPEND INC ${WINTAB_INC})
141
142         list(APPEND SRC
143                 intern/GHOST_DisplayManagerWin32.cpp
144                 intern/GHOST_SystemWin32.cpp
145                 intern/GHOST_SystemPathsWin32.cpp
146                 intern/GHOST_WindowWin32.cpp
147                 intern/GHOST_DropTargetWin32.cpp
148
149                 intern/GHOST_DisplayManagerWin32.h
150                 intern/GHOST_DropTargetWin32.h
151                 intern/GHOST_SystemWin32.h
152                 intern/GHOST_SystemPathsWin32.h
153                 intern/GHOST_WindowWin32.h
154         )
155 endif()
156
157 blender_add_lib(bf_intern_ghost "${SRC}" "${INC}")
158