synched with trunk at revision 30597
[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         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_Buttons.cpp
37         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_CallbackEventConsumer.cpp
38         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_C-api.cpp
39         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManager.cpp
40         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_EventManager.cpp
41         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_EventPrinter.cpp
42         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_ISystem.cpp
43         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_ModifierKeys.cpp
44         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_NDOFManager.cpp
45         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_Path-api.cpp
46         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_Rect.cpp
47         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_System.cpp
48         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_TimerManager.cpp
49         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_Window.cpp
50         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowManager.cpp
51 )
52
53 IF(APPLE)
54         IF(WITH_COCOA)
55                 SET(SRC ${SRC}
56                         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCocoa.mm
57                         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCocoa.mm
58                         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCocoa.mm
59                 )
60         ELSE(WITH_COCOA)
61                 SET(SRC ${SRC}
62                         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp
63                         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp
64                         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp
65                 )
66         ENDIF(WITH_COCOA)
67
68         IF(WITH_QUICKTIME)
69                 ADD_DEFINITIONS(-DWITH_QUICKTIME)
70         ENDIF(WITH_QUICKTIME)
71 ELSEIF(WIN32)
72         SET(INC ${INC} ${WINTAB_INC})
73
74         SET(SRC ${SRC}
75                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp
76                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp
77                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp
78                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DropTargetWin32.cpp
79         )
80 ELSEIF(UNIX)
81         SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
82
83         SET(SRC ${SRC}
84                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp
85                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp
86                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp
87         )
88
89         ADD_DEFINITIONS(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
90
91 ENDIF(APPLE)
92
93 BLENDERLIB(bf_ghost "${SRC}" "${INC}")
94