Merge with trunk, revision 28528 - 28976.
[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_Rect.cpp
46         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_System.cpp
47         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_TimerManager.cpp
48         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_Window.cpp
49         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowManager.cpp
50 )
51
52 IF(APPLE)
53         IF(WITH_COCOA)
54                 SET(SRC ${SRC}
55                         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCocoa.mm
56                         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCocoa.mm
57                         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCocoa.mm
58                 )
59         ELSE(WITH_COCOA)
60                 SET(SRC ${SRC}
61                         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp
62                         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp
63                         ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp
64                 )
65         ENDIF(WITH_COCOA)
66
67         IF(WITH_QUICKTIME)
68                 ADD_DEFINITIONS(-DWITH_QUICKTIME)
69         ENDIF(WITH_QUICKTIME)
70 ELSEIF(WIN32)
71         SET(INC ${INC} ${WINTAB_INC})
72
73         SET(SRC ${SRC}
74                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp
75                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp
76                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp
77                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DropTargetWin32.cpp
78         )
79 ELSEIF(UNIX)
80         SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
81
82         SET(SRC ${SRC}
83                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp
84                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp
85                 ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp
86         )
87 ENDIF(APPLE)
88
89 BLENDERLIB(bf_ghost "${SRC}" "${INC}")
90