2006-11-17 02:27:12 +00:00
|
|
|
# $Id$
|
2008-04-16 22:40:48 +00:00
|
|
|
# ***** BEGIN GPL LICENSE BLOCK *****
|
2006-11-17 02:27:12 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
2008-04-16 22:40:48 +00:00
|
|
|
# of the License, or (at your option) any later version.
|
2006-11-17 02:27:12 +00:00
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2006-11-17 02:27:12 +00:00
|
|
|
#
|
|
|
|
# The Original Code is Copyright (C) 2006, Blender Foundation
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# The Original Code is: all of this file.
|
|
|
|
#
|
|
|
|
# Contributor(s): Jacques Beaurain.
|
|
|
|
#
|
2008-04-16 22:40:48 +00:00
|
|
|
# ***** END GPL LICENSE BLOCK *****
|
2006-11-17 02:27:12 +00:00
|
|
|
|
2006-12-06 00:28:13 +00:00
|
|
|
MESSAGE(STATUS "Configuring blenderplayer")
|
|
|
|
|
2006-11-17 02:27:12 +00:00
|
|
|
SETUP_LIBDIRS()
|
|
|
|
|
|
|
|
IF(WITH_QUICKTIME)
|
2009-09-06 01:51:23 +00:00
|
|
|
ADD_DEFINITIONS(-DWITH_QUICKTIME)
|
2006-11-17 02:27:12 +00:00
|
|
|
ENDIF(WITH_QUICKTIME)
|
|
|
|
|
2009-07-19 19:36:56 +00:00
|
|
|
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
2009-09-06 01:51:23 +00:00
|
|
|
ADD_DEFINITIONS(-DWITH_BINRELOC)
|
|
|
|
INCLUDE_DIRECTORIES(${BINRELOC_INC})
|
2009-07-19 19:36:56 +00:00
|
|
|
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
2008-04-11 19:58:54 +00:00
|
|
|
|
2006-12-07 00:18:57 +00:00
|
|
|
ADD_CUSTOM_COMMAND(
|
2009-09-06 01:51:23 +00:00
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
|
|
|
|
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
|
|
|
|
DEPENDS ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna
|
2006-12-07 00:18:57 +00:00
|
|
|
)
|
|
|
|
|
2010-11-21 13:41:43 +00:00
|
|
|
IF(WIN32 AND NOT UNIX)
|
2009-09-06 01:51:23 +00:00
|
|
|
ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../icons/winblender.rc)
|
2010-11-21 13:41:43 +00:00
|
|
|
ELSE(WIN32 AND NOT UNIX)
|
2009-09-06 01:51:23 +00:00
|
|
|
ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
|
2010-11-21 13:41:43 +00:00
|
|
|
ENDIF(WIN32 AND NOT UNIX)
|
2006-11-17 02:27:12 +00:00
|
|
|
|
|
|
|
ADD_DEPENDENCIES(blenderplayer makesdna)
|
|
|
|
|
2006-12-07 00:18:57 +00:00
|
|
|
FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
|
2006-11-17 02:27:12 +00:00
|
|
|
|
2010-11-18 11:42:05 +00:00
|
|
|
SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} ge_player_common ge_player_ghost blenkernel_blc)
|
2006-11-17 02:27:12 +00:00
|
|
|
|
2008-04-11 19:58:54 +00:00
|
|
|
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
2009-09-06 01:51:23 +00:00
|
|
|
SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
|
2008-04-11 19:58:54 +00:00
|
|
|
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
|
|
|
2006-11-17 02:27:12 +00:00
|
|
|
IF(UNIX)
|
2009-09-06 01:51:23 +00:00
|
|
|
# Sort libraries
|
|
|
|
SET(BLENDER_SORTED_LIBS
|
2010-11-18 11:42:05 +00:00
|
|
|
ge_player_ghost
|
|
|
|
ge_player_common
|
2010-08-24 04:29:23 +00:00
|
|
|
bf_intern_string
|
2010-10-16 09:27:02 +00:00
|
|
|
bf_intern_ghost
|
2009-09-06 01:51:23 +00:00
|
|
|
bf_rna
|
|
|
|
bf_blenkernel
|
|
|
|
bf_blenloader
|
|
|
|
bf_blenpluginapi
|
2010-11-18 11:42:05 +00:00
|
|
|
ge_blen_routines
|
2010-11-12 07:16:33 +00:00
|
|
|
bf_editor_datafiles
|
2010-11-18 11:42:05 +00:00
|
|
|
ge_converter
|
|
|
|
ge_logic_ketsji
|
|
|
|
ge_phys_bullet
|
|
|
|
ge_phys_dummy
|
|
|
|
ge_phys_common
|
|
|
|
ge_logic
|
|
|
|
ge_rasterizer
|
|
|
|
ge_oglrasterizer
|
|
|
|
ge_logic_expressions
|
|
|
|
ge_scenegraph
|
2010-10-16 09:27:02 +00:00
|
|
|
bf_ikplugin
|
|
|
|
bf_intern_itasc
|
|
|
|
bf_intern_ik
|
|
|
|
bf_intern_smoke
|
2010-05-08 05:56:34 +00:00
|
|
|
bf_modifiers
|
2010-08-24 04:29:23 +00:00
|
|
|
bf_intern_moto
|
2010-11-18 11:42:05 +00:00
|
|
|
bf_gen_system
|
2009-09-06 01:51:23 +00:00
|
|
|
bf_nodes
|
|
|
|
bf_gpu
|
|
|
|
bf_imbuf
|
|
|
|
bf_avi
|
2010-11-18 11:42:05 +00:00
|
|
|
ge_logic_network
|
|
|
|
ge_logic_ngnetwork
|
|
|
|
ge_logic_loopbacknetwork
|
2009-09-06 01:51:23 +00:00
|
|
|
extern_bullet
|
2010-08-24 04:29:23 +00:00
|
|
|
bf_intern_guardedalloc
|
|
|
|
bf_intern_memutil
|
2009-09-06 01:51:23 +00:00
|
|
|
bf_python
|
2010-08-24 04:29:23 +00:00
|
|
|
bf_python_ext
|
2009-09-06 01:51:23 +00:00
|
|
|
bf_blenlib
|
2010-11-18 11:42:05 +00:00
|
|
|
bf_imbuf_cineon
|
|
|
|
bf_imbuf_openexr
|
2010-08-24 04:29:23 +00:00
|
|
|
extern_openjpeg
|
2010-11-18 11:42:05 +00:00
|
|
|
bf_imbuf_dds
|
2009-09-06 01:51:23 +00:00
|
|
|
bf_readblenfile
|
|
|
|
bf_dna
|
2010-11-18 11:42:05 +00:00
|
|
|
ge_videotex
|
2009-09-06 01:51:23 +00:00
|
|
|
bf_blenfont
|
2010-08-24 04:29:23 +00:00
|
|
|
bf_intern_audaspace
|
2009-09-06 01:51:23 +00:00
|
|
|
blenkernel_blc
|
|
|
|
extern_binreloc
|
|
|
|
extern_glew
|
2010-09-15 19:03:52 +00:00
|
|
|
extern_minilzo
|
2010-10-16 09:27:02 +00:00
|
|
|
bf_intern_ghost # duplicate for linking
|
|
|
|
bf_blenkernel # duplicate for linking
|
2009-09-06 01:51:23 +00:00
|
|
|
)
|
2009-08-19 07:48:56 +00:00
|
|
|
|
2009-09-06 01:51:23 +00:00
|
|
|
IF(WITH_QUICKTIME)
|
2010-05-08 05:56:34 +00:00
|
|
|
SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_quicktime)
|
2009-09-06 01:51:23 +00:00
|
|
|
ENDIF(WITH_QUICKTIME)
|
|
|
|
|
|
|
|
IF(WITH_CXX_GUARDEDALLOC)
|
2010-08-24 04:29:23 +00:00
|
|
|
SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_intern_guardedalloc_cpp)
|
2009-09-06 01:51:23 +00:00
|
|
|
ENDIF(WITH_CXX_GUARDEDALLOC)
|
|
|
|
|
|
|
|
FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
|
|
|
|
SET(REMLIB ${SORTLIB})
|
|
|
|
FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
|
|
|
|
IF(${SEARCHLIB} STREQUAL ${SORTLIB})
|
|
|
|
SET(REMLIB "")
|
|
|
|
ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
|
|
|
|
ENDFOREACH(SEARCHLIB)
|
|
|
|
IF(REMLIB)
|
|
|
|
MESSAGE(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured")
|
|
|
|
LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
|
|
|
|
ENDIF(REMLIB)
|
|
|
|
ENDFOREACH(SORTLIB)
|
|
|
|
|
|
|
|
TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_SORTED_LIBS})
|
2006-11-17 02:27:12 +00:00
|
|
|
ELSE(UNIX)
|
2009-09-06 01:51:23 +00:00
|
|
|
TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS})
|
2006-11-17 02:27:12 +00:00
|
|
|
ENDIF(UNIX)
|
|
|
|
|
2009-09-03 02:55:23 +00:00
|
|
|
IF(WITH_PLAYER)
|
2009-09-06 01:51:23 +00:00
|
|
|
ADD_SUBDIRECTORY(bad_level_call_stubs)
|
2009-09-03 02:55:23 +00:00
|
|
|
ENDIF(WITH_PLAYER)
|
|
|
|
|
2007-02-18 15:01:07 +00:00
|
|
|
SETUP_LIBLINKS(blenderplayer)
|