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,
|
|
|
|
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
bf_string
|
|
|
|
bf_ghost
|
|
|
|
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
|
|
|
|
bf_ikplugin
|
|
|
|
bf_ITASC
|
|
|
|
bf_IK
|
|
|
|
bf_smoke
|
2009-09-06 01:51:23 +00:00
|
|
|
bf_moto
|
|
|
|
bf_kernel
|
|
|
|
bf_nodes
|
|
|
|
bf_gpu
|
|
|
|
bf_imbuf
|
|
|
|
bf_avi
|
|
|
|
kx_network
|
|
|
|
bf_ngnetwork
|
|
|
|
bf_loopbacknetwork
|
|
|
|
extern_bullet
|
|
|
|
bf_guardedalloc
|
|
|
|
bf_memutil
|
|
|
|
bf_python
|
|
|
|
bf_gen_python
|
|
|
|
bf_blenlib
|
|
|
|
bf_cineon
|
|
|
|
bf_openexr
|
|
|
|
extern_libopenjpeg
|
|
|
|
bf_dds
|
|
|
|
bf_readblenfile
|
|
|
|
bf_dna
|
|
|
|
bf_videotex
|
|
|
|
bf_blenfont
|
|
|
|
bf_audaspace
|
|
|
|
blenkernel_blc
|
|
|
|
extern_binreloc
|
|
|
|
extern_glew
|
|
|
|
)
|
2009-08-19 07:48:56 +00:00
|
|
|
|
2009-09-06 01:51:23 +00:00
|
|
|
IF(WITH_QUICKTIME)
|
|
|
|
SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} quicktime)
|
|
|
|
ENDIF(WITH_QUICKTIME)
|
|
|
|
|
|
|
|
IF(WITH_CXX_GUARDEDALLOC)
|
|
|
|
SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_guardedalloc_cpp)
|
|
|
|
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)
|