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
|
|
|
)
|
|
|
|
|
2006-11-17 02:27:12 +00:00
|
|
|
IF(WIN32)
|
2009-09-06 01:51:23 +00:00
|
|
|
ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../icons/winblender.rc)
|
2006-11-17 02:27:12 +00:00
|
|
|
ELSE(WIN32)
|
2009-09-06 01:51:23 +00:00
|
|
|
ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
|
2006-11-17 02:27:12 +00:00
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} gp_common gp_ghost blenkernel_blc)
|
|
|
|
|
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
|
|
|
|
gp_ghost
|
|
|
|
gp_common
|
2010-08-24 04:29:23 +00:00
|
|
|
bf_intern_string
|
|
|
|
bf_intern_ghost
|
2009-09-06 01:51:23 +00:00
|
|
|
bf_rna
|
|
|
|
bf_blenkernel
|
|
|
|
bf_blenloader
|
|
|
|
bf_blenpluginapi
|
|
|
|
bf_blroutines
|
|
|
|
bf_converter
|
|
|
|
bf_ketsji
|
|
|
|
bf_bullet
|
|
|
|
bf_common
|
|
|
|
bf_dummy
|
|
|
|
bf_logic
|
|
|
|
bf_rasterizer
|
|
|
|
bf_oglrasterizer
|
|
|
|
bf_expressions
|
2010-01-10 21:33:41 +00:00
|
|
|
bf_scenegraph
|
2010-05-08 05:56:34 +00:00
|
|
|
bf_ikplugin
|
2010-08-24 04:29:23 +00:00
|
|
|
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
|
2009-09-06 01:51:23 +00:00
|
|
|
bf_kernel
|
|
|
|
bf_nodes
|
|
|
|
bf_gpu
|
|
|
|
bf_imbuf
|
|
|
|
bf_avi
|
|
|
|
kx_network
|
|
|
|
bf_ngnetwork
|
|
|
|
bf_loopbacknetwork
|
|
|
|
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-08-03 11:25:34 +00:00
|
|
|
bf_cineon
|
2009-09-06 01:51:23 +00:00
|
|
|
bf_openexr
|
2010-08-24 04:29:23 +00:00
|
|
|
extern_openjpeg
|
2009-09-06 01:51:23 +00:00
|
|
|
bf_dds
|
|
|
|
bf_readblenfile
|
|
|
|
bf_dna
|
|
|
|
bf_videotex
|
|
|
|
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
|
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)
|