2 # ***** BEGIN GPL LICENSE BLOCK *****
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.
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.
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.
18 # The Original Code is Copyright (C) 2006, Blender Foundation
19 # All rights reserved.
21 # The Original Code is: all of this file.
23 # Contributor(s): Jacques Beaurain.
25 # ***** END GPL LICENSE BLOCK *****
27 MESSAGE(STATUS "Configuring blenderplayer")
32 ADD_DEFINITIONS(-DWITH_QUICKTIME)
36 ADD_DEFINITIONS(-DWITH_BINRELOC)
37 INCLUDE_DIRECTORIES(${BINRELOC_INC})
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
47 ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../source/icons/winblender.rc)
49 ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
52 ADD_DEPENDENCIES(blenderplayer makesdna)
54 FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
56 SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} gp_common gp_ghost blenkernel_blc)
58 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
59 SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
60 ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
64 SET(BLENDER_SORTED_LIBS
118 FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
119 SET(REMLIB ${SORTLIB})
120 FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
121 IF(${SEARCHLIB} STREQUAL ${SORTLIB})
123 ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
124 ENDFOREACH(SEARCHLIB)
126 MESSAGE(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured")
127 LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
131 TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_SORTED_LIBS})
133 TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS})
136 SETUP_LIBLINKS(blenderplayer)