mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-02-07 00:25:54 +01:00
Fix build.
This commit is contained in:
parent
11987354ff
commit
a5365f8ca8
@ -13,7 +13,6 @@ sources = [
|
|||||||
"xatlas/xatlas.cpp",
|
"xatlas/xatlas.cpp",
|
||||||
]
|
]
|
||||||
|
|
||||||
if version.major < 4:
|
|
||||||
sources.append("delaunay/r128.c")
|
sources.append("delaunay/r128.c")
|
||||||
|
|
||||||
if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes':
|
if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes':
|
||||||
|
@ -47,7 +47,6 @@ sources = [
|
|||||||
"material_cache/prop_material_cache.cpp"
|
"material_cache/prop_material_cache.cpp"
|
||||||
]
|
]
|
||||||
|
|
||||||
if version.minor >= 4:
|
|
||||||
sources.append("props/prop_data_portal.cpp")
|
sources.append("props/prop_data_portal.cpp")
|
||||||
|
|
||||||
if env["module_texture_packer_enabled"]:
|
if env["module_texture_packer_enabled"]:
|
||||||
|
@ -46,7 +46,6 @@ sources = [
|
|||||||
"material_cache/prop_2d_material_cache.cpp"
|
"material_cache/prop_2d_material_cache.cpp"
|
||||||
]
|
]
|
||||||
|
|
||||||
if version.minor >= 4:
|
|
||||||
sources.append("props/prop_2d_data_portal.cpp")
|
sources.append("props/prop_2d_data_portal.cpp")
|
||||||
|
|
||||||
if env["module_texture_packer_enabled"]:
|
if env["module_texture_packer_enabled"]:
|
||||||
|
@ -5,21 +5,12 @@ import sys
|
|||||||
|
|
||||||
import version
|
import version
|
||||||
|
|
||||||
if version.major > 2:
|
|
||||||
yes = True
|
yes = True
|
||||||
no = False
|
no = False
|
||||||
else:
|
|
||||||
yes = 'yes'
|
|
||||||
no = 'no'
|
|
||||||
|
|
||||||
|
|
||||||
def has_wrapper_for(lib):
|
def has_wrapper_for(lib):
|
||||||
|
|
||||||
if version.major == 2:
|
|
||||||
return False
|
|
||||||
if version.minor > 2:
|
|
||||||
return True
|
return True
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def is_active():
|
def is_active():
|
||||||
@ -40,11 +31,7 @@ def can_build():
|
|||||||
|
|
||||||
|
|
||||||
def get_opts():
|
def get_opts():
|
||||||
|
|
||||||
if version.major > 2:
|
|
||||||
from SCons.Variables import BoolVariable
|
from SCons.Variables import BoolVariable
|
||||||
else:
|
|
||||||
def BoolVariable(a,b,c): return (a,b,c)
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
('frt_arch', 'Architecture (no/arm32v6/arm32v7/arm64v8)', 'no'),
|
('frt_arch', 'Architecture (no/arm32v6/arm32v7/arm64v8)', 'no'),
|
||||||
@ -66,10 +53,8 @@ def check(env, key):
|
|||||||
|
|
||||||
if not (key in env):
|
if not (key in env):
|
||||||
return False
|
return False
|
||||||
if version.major > 2:
|
|
||||||
return env[key]
|
return env[key]
|
||||||
else:
|
|
||||||
return env[key] == 'yes'
|
|
||||||
|
|
||||||
def configure(env):
|
def configure(env):
|
||||||
|
|
||||||
@ -133,9 +118,8 @@ def configure(env):
|
|||||||
if os.system(pkg_config + ' --exists libpulse') == 0:
|
if os.system(pkg_config + ' --exists libpulse') == 0:
|
||||||
print('Enabling PulseAudio')
|
print('Enabling PulseAudio')
|
||||||
env.Append(CPPDEFINES=['PULSEAUDIO_ENABLED'])
|
env.Append(CPPDEFINES=['PULSEAUDIO_ENABLED'])
|
||||||
if version.major == 2:
|
|
||||||
env.ParseConfig(pkg_config + ' --cflags --libs libpulse-simple')
|
if has_wrapper_for('libpulse'):
|
||||||
elif has_wrapper_for('libpulse'):
|
|
||||||
env.ParseConfig(pkg_config + ' --cflags libpulse')
|
env.ParseConfig(pkg_config + ' --cflags libpulse')
|
||||||
else:
|
else:
|
||||||
env.ParseConfig(pkg_config + ' --cflags --libs libpulse')
|
env.ParseConfig(pkg_config + ' --cflags --libs libpulse')
|
||||||
@ -162,9 +146,10 @@ def configure(env):
|
|||||||
env.Append(CCFLAGS=['-O3', '-DDEBUG_ENABLED'])
|
env.Append(CCFLAGS=['-O3', '-DDEBUG_ENABLED'])
|
||||||
elif env['target'] == 'debug':
|
elif env['target'] == 'debug':
|
||||||
env.Append(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
|
env.Append(CCFLAGS=['-g2', '-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
|
||||||
if env['target'].startswith('release'):
|
|
||||||
if version.major == 2 or (version.major == 3 and version.minor == 0):
|
#if env['target'].startswith('release'):
|
||||||
env.Append(CCFLAGS=['-ffast-math'])
|
# if version.major == 2 or (version.major == 3 and version.minor == 0):
|
||||||
|
# env.Append(CCFLAGS=['-ffast-math'])
|
||||||
|
|
||||||
if env['frt_arch'] == 'arm32v6':
|
if env['frt_arch'] == 'arm32v6':
|
||||||
env.Append(CCFLAGS=['-march=armv6', '-mfpu=vfp', '-mfloat-abi=hard'])
|
env.Append(CCFLAGS=['-march=armv6', '-mfpu=vfp', '-mfloat-abi=hard'])
|
||||||
@ -179,7 +164,8 @@ def configure(env):
|
|||||||
#env.Append(CFLAGS=['-std=gnu11']) # for libwebp (maybe more in the future)
|
#env.Append(CFLAGS=['-std=gnu11']) # for libwebp (maybe more in the future)
|
||||||
env.Append(CPPFLAGS=['-DFRT_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DGLES_ENABLED'])
|
env.Append(CPPFLAGS=['-DFRT_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DGLES_ENABLED'])
|
||||||
env.Append(LIBS=['pthread'])
|
env.Append(LIBS=['pthread'])
|
||||||
if env['frt_arch'] == 'arm32v6' and version.major == 3 and version.minor >= 4: # TODO find out exact combination
|
|
||||||
|
if env['frt_arch'] == 'arm32v6':
|
||||||
env.Append(LIBS=['atomic'])
|
env.Append(LIBS=['atomic'])
|
||||||
|
|
||||||
env.Append(FRT_MODULES=['envprobe.cpp'])
|
env.Append(FRT_MODULES=['envprobe.cpp'])
|
||||||
|
@ -91,8 +91,10 @@ def configure_misc(env):
|
|||||||
env.Append(CPPFLAGS=['-DFRT_ENABLED'])
|
env.Append(CPPFLAGS=['-DFRT_ENABLED'])
|
||||||
#env.Append(CFLAGS=['-std=gnu11']) # for libwebp (maybe more in the future)
|
#env.Append(CFLAGS=['-std=gnu11']) # for libwebp (maybe more in the future)
|
||||||
env.Append(LIBS=['pthread', 'z', 'dl'])
|
env.Append(LIBS=['pthread', 'z', 'dl'])
|
||||||
if env['frt_arch'] == 'arm32v6' and version.minor >= 4: # TODO find out exact combination
|
|
||||||
|
if env['frt_arch'] == 'arm32v6':
|
||||||
env.Append(LIBS=['atomic'])
|
env.Append(LIBS=['atomic'])
|
||||||
|
|
||||||
if env['CXX'] == 'clang++':
|
if env['CXX'] == 'clang++':
|
||||||
env['CC'] = 'clang'
|
env['CC'] = 'clang'
|
||||||
env['LD'] = 'clang++'
|
env['LD'] = 'clang++'
|
||||||
|
Loading…
Reference in New Issue
Block a user