1 # ***** BEGIN GPL LICENSE BLOCK *****
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 # The Original Code is Copyright (C) 2006, Blender Foundation
18 # All rights reserved.
20 # The Original Code is: all of this file.
22 # Contributor(s): Jacques Beaurain.
24 # ***** END GPL LICENSE BLOCK *****
26 # message(STATUS "Configuring blenderplayer")
30 if(WITH_CODEC_QUICKTIME)
31 add_definitions(-DWITH_QUICKTIME)
34 if(WIN32 AND NOT UNIX)
35 string(SUBSTRING ${BLENDER_VERSION} 0 1 bver1)
36 string(SUBSTRING ${BLENDER_VERSION} 2 1 bver2)
37 string(SUBSTRING ${BLENDER_VERSION} 3 1 bver3)
41 -DBLEN_VER_RC_STR_M=${BLENDER_VERSION}
42 -DBLEN_VER_RC_1=${bver1}
43 -DBLEN_VER_RC_2=${bver2}
44 -DBLEN_VER_RC_3=${bver3}
49 -DBLEN_VER_RC_STR=${BLENDER_VERSION}
50 -DBLEN_VER_RC_1=${bver1}
51 -DBLEN_VER_RC_2=${bver2}
52 -DBLEN_VER_RC_3=${bver3}
57 add_executable(blenderplayer ${EXETYPE} bad_level_call_stubs/stubs.c ../icons/winblender.rc)
60 add_executable(blenderplayer ${EXETYPE} bad_level_call_stubs/stubs.c)
62 execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BLENDER_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
63 set(PLAYER_SOURCEDIR ${CMAKE_SOURCE_DIR}/release/darwin/blenderplayer.app)
64 set(PLAYER_SOURCEINFO ${PLAYER_SOURCEDIR}/Contents/Info.plist)
65 set_target_properties(blenderplayer PROPERTIES
66 MACOSX_BUNDLE_INFO_PLIST ${PLAYER_SOURCEINFO}
67 MACOSX_BUNDLE_SHORT_VERSION_STRING ${BLENDER_VERSION}
68 MACOSX_BUNDLE_LONG_VERSION_STRING "${BLENDER_VERSION} ${BLENDER_DATE}")
71 add_executable(blenderplayer bad_level_call_stubs/stubs.c)
74 add_dependencies(blenderplayer makesdna)
76 get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
78 list(APPEND BLENDER_LINK_LIBS
84 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
85 list(APPEND BLENDER_LINK_LIBS extern_binreloc)
90 set(BLENDER_SORTED_LIBS
123 ge_logic_loopbacknetwork
125 bf_intern_guardedalloc
145 bf_intern_ghost # duplicate for linking
146 bf_blenkernel # duplicate for linking
148 extern_recastnavigation
150 bf_intern_opencolorio
155 if(WITH_MOD_CLOTH_ELTOPO)
156 list(APPEND BLENDER_SORTED_LIBS extern_eltopo)
159 if(NOT WITH_SYSTEM_GLEW)
160 list(APPEND BLENDER_SORTED_LIBS extern_glew)
164 list(APPEND BLENDER_SORTED_LIBS extern_lzma)
168 list(APPEND BLENDER_SORTED_LIBS extern_libmv)
169 list(APPEND BLENDER_SORTED_LIBS extern_ceres)
172 list(APPEND BLENDER_SORTED_LIBS extern_colamd)
175 list(APPEND BLENDER_SORTED_LIBS bf_intern_bsp)
176 list(APPEND BLENDER_SORTED_LIBS bf_intern_moto)
180 list(APPEND BLENDER_SORTED_LIBS extern_carve)
184 list(APPEND BLENDER_SORTED_LIBS extern_xdnd)
187 if(WITH_CODEC_QUICKTIME)
188 list(APPEND BLENDER_SORTED_LIBS bf_quicktime)
191 if(WITH_CXX_GUARDEDALLOC)
192 list(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
195 if(WITH_INTERNATIONAL)
196 list(APPEND BLENDER_SORTED_LIBS bf_intern_locale)
199 foreach(SORTLIB ${BLENDER_SORTED_LIBS})
200 set(REMLIB ${SORTLIB})
201 foreach(SEARCHLIB ${BLENDER_LINK_LIBS})
202 if(${SEARCHLIB} STREQUAL ${SORTLIB})
207 # message(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured")
208 list(APPEND REM_MSG ${REMLIB})
209 list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
214 message(STATUS "Player Skipping: (${REM_MSG})")
216 target_link_libraries(blenderplayer ${BLENDER_SORTED_LIBS})
224 # target_link_libraries(blenderplayer ${BLENDER_LINK_LIBS})
228 add_subdirectory(bad_level_call_stubs)
231 setup_liblinks(blenderplayer)