Various fixes in rna_*_api.c files to remove compiler warnings.
[blender.git] / blenderplayer / 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 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 MESSAGE(STATUS "Configuring blenderplayer")
28
29 SETUP_LIBDIRS()
30
31 IF(WITH_QUICKTIME)
32   ADD_DEFINITIONS(-DWITH_QUICKTIME)
33 ENDIF(WITH_QUICKTIME)
34
35 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
36   ADD_DEFINITIONS(-DWITH_BINRELOC)
37   INCLUDE_DIRECTORIES(${BINRELOC_INC})
38 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
39
40 ADD_CUSTOM_COMMAND(
41   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
42   COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
43   DEPENDS ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna
44 )
45
46 IF(WIN32)
47   ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../source/icons/winblender.rc)
48 ELSE(WIN32)
49   ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
50 ENDIF(WIN32)
51
52 ADD_DEPENDENCIES(blenderplayer makesdna)
53
54 FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
55
56 SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} gp_common gp_ghost blenkernel_blc)
57
58 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
59   SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
60 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
61
62 IF(UNIX)
63   # Sort libraries
64   SET(BLENDER_SORTED_LIBS
65     gp_ghost 
66     gp_common 
67     bf_string 
68     bf_ghost 
69     bf_blenkernel 
70     verse 
71     bf_blenkernel 
72     bf_blenloader 
73     bf_blenpluginapi 
74     bf_blroutines 
75     bf_converter 
76     bf_sumo 
77     bf_ketsji 
78     extern_solid 
79     extern_qhull 
80     bf_bullet 
81     bf_common 
82     bf_dummy 
83     bf_logic 
84     bf_rasterizer 
85     bf_oglrasterizer 
86     bf_expressions 
87     bf_scenegraph 
88         bf_IK
89     bf_moto 
90     bf_kernel 
91     bf_nodes
92         bf_gpu
93     bf_imbuf
94     bf_avi 
95     kx_network 
96     bf_ngnetwork 
97     bf_loopbacknetwork 
98     extern_bullet 
99     bf_guardedalloc 
100     bf_memutil 
101     bf_blenlib 
102     bf_cineon 
103     bf_openexr 
104     extern_libopenjpeg 
105     bf_dds
106     bf_readblenfile 
107     blenkernel_blc
108     bf_quicktime
109     extern_binreloc
110         extern_glew
111   ) 
112
113   IF(WITH_CXX_GUARDEDALLOC)
114     SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_guardedalloc_cpp)
115   ENDIF(WITH_CXX_GUARDEDALLOC)
116
117   FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
118     SET(REMLIB ${SORTLIB})
119     FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
120       IF(${SEARCHLIB} STREQUAL ${SORTLIB})
121         SET(REMLIB "")
122       ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
123     ENDFOREACH(SEARCHLIB)
124     IF(REMLIB)
125       MESSAGE(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured")
126       LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
127     ENDIF(REMLIB)
128   ENDFOREACH(SORTLIB)
129
130   TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_SORTED_LIBS})
131 ELSE(UNIX)
132   TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS})
133 ENDIF(UNIX)
134
135 SETUP_LIBLINKS(blenderplayer)