Welcome to mirror list, hosted at ThFree Co, Russian Federation.

bs_libs.py « bs « scons « tools - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3783b926dfb9f7286d3082bb0b1e60364a4b6334 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Blender library functions

import sys
import os
import string
import SCons

import bs_globals

def common_libs(env):
	"""
	Append to env all libraries that are common to Blender and Blenderplayer
	"""
	env.Append (LIBS=[
		'blender_readblenfile',
		'blender_img',
		'blender_blenkernel',
		'blender_blenloader',
		'blender_blenpluginapi',
		'blender_imbuf',
		'blender_avi',
		'blender_blenlib',
		'blender_makesdna',
		'blender_kernel',
		'blender_GHOST',
		'blender_STR',
		'blender_guardedalloc',
		'blender_CTR',
		'blender_MEM',
		'blender_MT',
		'blender_BMF',
		'soundsystem'])
	if bs_globals.user_options_dict['USE_QUICKTIME'] == 1:
		env.Append (LIBS=['blender_quicktime'])

def international_libs(env):
	"""
	Append international font support libraries
	"""
	if bs_globals.user_options_dict['USE_INTERNATIONAL'] == 1:
		env.Append (LIBS=bs_globals.user_options_dict['FREETYPE_LIBRARY'])
		env.Append (LIBPATH=bs_globals.user_options_dict['FREETYPE_LIBPATH'])
		env.Append (LIBS=['blender_FTF'])
		env.Append (LIBS=bs_globals.user_options_dict['FTGL_LIBRARY'])
		env.Append (LIBPATH=bs_globals.user_options_dict['FTGL_LIBPATH'])
		env.Append (LIBS=bs_globals.user_options_dict['FREETYPE_LIBRARY'])

def blender_libs(env):
	"""
	Blender only libs (not in player)
	"""
	env.Append( LIBS=['blender_creator',
		'blender_blendersrc',
		'blender_render',
		'blender_yafray',
		'blender_renderconverter',
		'blender_radiosity',
		'blender_LOD',
		'blender_BSP',
		'blender_blenkernel',
		'blender_IK',
		'blender_ONL'])

def ketsji_libs(env):
	"""
	Game Engine libs
	"""
	if bs_globals.user_options_dict['BUILD_GAMEENGINE'] == 1:
		env.Append (LIBS=['KX_blenderhook',
				'KX_converter',
				'PHY_Dummy',
				'PHY_Physics',
				'KX_ketsji',
				'SCA_GameLogic',
				'RAS_rasterizer',
				'RAS_OpenGLRasterizer',
				'blender_expressions',
				'SG_SceneGraph',
				'blender_MT',
				'KX_blenderhook',
				'KX_network',
				'blender_kernel',
				'NG_network',
				'NG_loopbacknetwork'])
		if bs_globals.user_options_dict['USE_PHYSICS'] == 'solid':
			env.Append (LIBS=['PHY_Sumo', 'PHY_Physics', 'blender_MT', 'extern_solid', 'extern_qhull'])
		else:
			env.Append (LIBS=['PHY_Ode',
					'PHY_Physics'])
			env.Append (LIBS=bs_globals.user_options_dict['ODE_LIBRARY'])
			env.Append (LIBPATH=bs_globals.user_options_dict['ODE_LIBPATH'])

def player_libs(env):
	"""
	Player libraries
	"""
	env.Append (LIBS=['GPG_ghost',
			'GPC_common'])

def player_libs2(env):
	"""
	Link order shenannigans: these libs are added after common_libs
	"""
	env.Append (LIBS=['blender_blenkernel_blc',
			'soundsystem'])

def winblenderres(env):
	"""
	build the windows icon resource file
	"""
	if sys.platform == 'win32':
		env.RES(['source/icons/winblender.rc'])

def system_libs(env):
	"""
	System libraries: Python, SDL, PNG, JPEG, Gettext, OpenAL, Carbon
	"""
	env.Append (LIBS=['blender_python'])
	env.Append (LIBS=bs_globals.user_options_dict['PYTHON_LIBRARY'])
	env.Append (LIBPATH=bs_globals.user_options_dict['PYTHON_LIBPATH'])
	env.Append (LINKFLAGS=bs_globals.user_options_dict['PYTHON_LINKFLAGS'])
	env.Append (LIBS=bs_globals.user_options_dict['SDL_LIBRARY'])
	env.Append (LIBPATH=bs_globals.user_options_dict['SDL_LIBPATH'])
	env.Append (LIBS=bs_globals.user_options_dict['PNG_LIBRARY'])
	env.Append (LIBPATH=bs_globals.user_options_dict['PNG_LIBPATH'])
	env.Append (LIBS=bs_globals.user_options_dict['JPEG_LIBRARY'])
	env.Append (LIBPATH=bs_globals.user_options_dict['JPEG_LIBPATH'])
	env.Append (LIBS=bs_globals.user_options_dict['GETTEXT_LIBRARY'])
	env.Append (LIBPATH=bs_globals.user_options_dict['GETTEXT_LIBPATH'])
	env.Append (LIBS=bs_globals.user_options_dict['Z_LIBRARY'])
	env.Append (LIBPATH=bs_globals.user_options_dict['Z_LIBPATH'])
	if bs_globals.user_options_dict['USE_OPENAL'] == 1:
		env.Append (LIBS=bs_globals.user_options_dict['OPENAL_LIBRARY'])
		env.Append (LIBPATH=bs_globals.user_options_dict['OPENAL_LIBPATH'])
	env.Append (LIBS=bs_globals.user_options_dict['PLATFORM_LIBS'])
	env.Append (LIBPATH=bs_globals.user_options_dict['PLATFORM_LIBPATH'])
	if sys.platform == 'darwin':
		env.Append (LINKFLAGS='-framework')
		env.Append (LINKFLAGS='Carbon')
		env.Append (LINKFLAGS='-framework')
		env.Append (LINKFLAGS='AGL')
		env.Append (LINKFLAGS='-framework')
		env.Append (LINKFLAGS='AudioUnit')
		env.Append (LINKFLAGS='-framework')
		env.Append (LINKFLAGS='AudioToolbox')
		env.Append (LINKFLAGS='-framework')
		env.Append (LINKFLAGS='CoreAudio')
		if bs_globals.user_options_dict['USE_QUICKTIME'] == 1:
			env.Append (LINKFLAGS='-framework')
			env.Append (LINKFLAGS='QuickTime')
	else:
		env.Append (LINKFLAGS=bs_globals.user_options_dict['PLATFORM_LINKFLAGS'])
	env.BuildDir (bs_globals.root_build_dir, '.', duplicate=0)