Added scons options "shared_libname=true" to link agains the system shared libraries for lzo, sfml, and soil. For example add the scons option "shared_lzo=true" for lzo. This will check for the system libraries and then fall back to building and linking statically against the Externals if not found. You must have liblzo2-dev, libsoil-dev, and libsfml-dev installed. Note that you need version 1.5 or later for sfml. Currently scons doesn't check the version for you.
If you are having trouble with segmentation faults in linux try "shared_soil=true". That seems to fix the problem. How do we fix this for the static build? git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5182 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
914cb632fb
commit
c455673f87
|
@ -10,4 +10,4 @@ env_lzo = env.Clone(
|
||||||
CCFLAGS = env.filterWarnings(env['CCFLAGS']),
|
CCFLAGS = env.filterWarnings(env['CCFLAGS']),
|
||||||
CXXFLAGS = env.filterWarnings(env['CXXFLAGS']),
|
CXXFLAGS = env.filterWarnings(env['CXXFLAGS']),
|
||||||
)
|
)
|
||||||
env_lzo.StaticLibrary(env['local_libs'] + "minilzo", files)
|
env_lzo.StaticLibrary(env['local_libs'] + "lzo2", files)
|
||||||
|
|
|
@ -19,4 +19,4 @@ env_sfml = env.Clone(
|
||||||
CXXFLAGS = env.filterWarnings(env['CXXFLAGS']),
|
CXXFLAGS = env.filterWarnings(env['CXXFLAGS']),
|
||||||
)
|
)
|
||||||
|
|
||||||
env_sfml.StaticLibrary(env['local_libs'] + "sfml", files)
|
env_sfml.StaticLibrary(env['local_libs'] + "sfml-network", files)
|
||||||
|
|
|
@ -15,4 +15,4 @@ env_soil = env.Clone(
|
||||||
parse_flags = ['-fPIC']
|
parse_flags = ['-fPIC']
|
||||||
)
|
)
|
||||||
|
|
||||||
env_soil.StaticLibrary(env['local_libs'] + "libsoil", files)
|
env_soil.StaticLibrary(env['local_libs'] + "SOIL", files)
|
||||||
|
|
46
SConstruct
46
SConstruct
|
@ -50,10 +50,7 @@ include_paths = [
|
||||||
basedir + 'Source/Core/Core/Src',
|
basedir + 'Source/Core/Core/Src',
|
||||||
basedir + 'Source/Core/DebuggerWX/Src',
|
basedir + 'Source/Core/DebuggerWX/Src',
|
||||||
basedir + 'Externals/Bochs_disasm',
|
basedir + 'Externals/Bochs_disasm',
|
||||||
basedir + 'Externals/LZO',
|
|
||||||
basedir + 'Externals/SOIL',
|
|
||||||
basedir + 'Externals/Lua',
|
basedir + 'Externals/Lua',
|
||||||
basedir + 'Externals/SFML/include',
|
|
||||||
basedir + 'Externals/WiiUseSrc/Src',
|
basedir + 'Externals/WiiUseSrc/Src',
|
||||||
basedir + 'Source/Core/VideoCommon/Src',
|
basedir + 'Source/Core/VideoCommon/Src',
|
||||||
basedir + 'Source/Core/InputCommon/Src',
|
basedir + 'Source/Core/InputCommon/Src',
|
||||||
|
@ -64,9 +61,6 @@ include_paths = [
|
||||||
|
|
||||||
dirs = [
|
dirs = [
|
||||||
'Externals/Bochs_disasm',
|
'Externals/Bochs_disasm',
|
||||||
'Externals/LZO',
|
|
||||||
'Externals/SOIL',
|
|
||||||
'Externals/SFML/src',
|
|
||||||
'Externals/Lua',
|
'Externals/Lua',
|
||||||
'Externals/WiiUseSrc/Src',
|
'Externals/WiiUseSrc/Src',
|
||||||
'Source/Core/Common/Src',
|
'Source/Core/Common/Src',
|
||||||
|
@ -112,6 +106,9 @@ vars.AddVariables(
|
||||||
BoolVariable('wxgl', 'Set For Building with WX GL libs (WIP)', False),
|
BoolVariable('wxgl', 'Set For Building with WX GL libs (WIP)', False),
|
||||||
BoolVariable('opencl', 'Build with OpenCL', False),
|
BoolVariable('opencl', 'Build with OpenCL', False),
|
||||||
BoolVariable('nojit', 'Remove entire jit cores', False),
|
BoolVariable('nojit', 'Remove entire jit cores', False),
|
||||||
|
BoolVariable('shared_soil', 'Use system shared libSOIL', False),
|
||||||
|
BoolVariable('shared_lzo', 'Use system shared liblzo2', False),
|
||||||
|
BoolVariable('shared_sfml', 'Use system shared libsfml-network', False),
|
||||||
PathVariable('userdir', 'Set the name of the user data directory in home', '.dolphin-emu', PathVariable.PathAccept),
|
PathVariable('userdir', 'Set the name of the user data directory in home', '.dolphin-emu', PathVariable.PathAccept),
|
||||||
EnumVariable('install', 'Choose a local or global installation', 'local',
|
EnumVariable('install', 'Choose a local or global installation', 'local',
|
||||||
allowed_values = ('local', 'global'),
|
allowed_values = ('local', 'global'),
|
||||||
|
@ -324,6 +321,40 @@ if sys.platform != 'darwin':
|
||||||
# needed for mic
|
# needed for mic
|
||||||
env['HAVE_PORTAUDIO'] = conf.CheckPortaudio(1890)
|
env['HAVE_PORTAUDIO'] = conf.CheckPortaudio(1890)
|
||||||
|
|
||||||
|
# SOIL
|
||||||
|
env['SHARED_SOIL'] = 0;
|
||||||
|
if env['shared_soil']:
|
||||||
|
env['SHARED_SOIL'] = conf.CheckPKG('SOIL')
|
||||||
|
if not env['SHARED_SOIL']:
|
||||||
|
print "shared SOIL library not detected"
|
||||||
|
print "falling back to the static library"
|
||||||
|
if not env['SHARED_SOIL']:
|
||||||
|
env['CPPPATH'] += [ basedir + 'Externals/SOIL' ]
|
||||||
|
dirs += ['Externals/SOIL']
|
||||||
|
|
||||||
|
# LZO
|
||||||
|
env['SHARED_LZO'] = 0;
|
||||||
|
if env['shared_lzo']:
|
||||||
|
env['SHARED_LZO'] = conf.CheckPKG('lzo2')
|
||||||
|
if not env['SHARED_LZO']:
|
||||||
|
print "shared LZO library not detected"
|
||||||
|
print "falling back to the static library"
|
||||||
|
if not env['SHARED_LZO']:
|
||||||
|
env['CPPPATH'] += [ basedir + 'Externals/LZO' ]
|
||||||
|
dirs += ['Externals/LZO']
|
||||||
|
|
||||||
|
# SFML
|
||||||
|
env['SHARED_SFML'] = 0;
|
||||||
|
if env['shared_sfml']:
|
||||||
|
# TODO: Check the version of sfml. It should be at least version 1.5
|
||||||
|
env['SHARED_SFML'] = conf.CheckPKG('sfml-network') and conf.CheckCXXHeader("SFML/Network/Ftp.hpp")
|
||||||
|
if not env['SHARED_SFML']:
|
||||||
|
print "shared sfml-network library not detected"
|
||||||
|
print "falling back to the static library"
|
||||||
|
if not env['SHARED_SFML']:
|
||||||
|
env['CPPPATH'] += [ basedir + 'Externals/SFML/include' ]
|
||||||
|
dirs += ['Externals/SFML/src']
|
||||||
|
|
||||||
#osx 64 specifics
|
#osx 64 specifics
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
if env['osx'] == '64cocoa':
|
if env['osx'] == '64cocoa':
|
||||||
|
@ -380,6 +411,9 @@ conf.Define('USE_WX', env['USE_WX'])
|
||||||
conf.Define('HAVE_X11', env['HAVE_X11'])
|
conf.Define('HAVE_X11', env['HAVE_X11'])
|
||||||
conf.Define('HAVE_COCOA', env['HAVE_COCOA'])
|
conf.Define('HAVE_COCOA', env['HAVE_COCOA'])
|
||||||
conf.Define('HAVE_PORTAUDIO', env['HAVE_PORTAUDIO'])
|
conf.Define('HAVE_PORTAUDIO', env['HAVE_PORTAUDIO'])
|
||||||
|
conf.Define('SHARED_SOIL', env['SHARED_SOIL'])
|
||||||
|
conf.Define('SHARED_LZO', env['SHARED_LZO'])
|
||||||
|
conf.Define('SHARED_SFML', env['SHARED_SFML'])
|
||||||
conf.Define('USER_DIR', "\"" + env['userdir'] + "\"")
|
conf.Define('USER_DIR', "\"" + env['userdir'] + "\"")
|
||||||
if (ARGUMENTS.get('install') == 'global'):
|
if (ARGUMENTS.get('install') == 'global'):
|
||||||
conf.Define('DATA_DIR', "\"" + env['data_dir'] + "\"")
|
conf.Define('DATA_DIR', "\"" + env['data_dir'] + "\"")
|
||||||
|
|
|
@ -138,7 +138,7 @@ libs = [
|
||||||
'bdisasm',
|
'bdisasm',
|
||||||
'inputcommon',
|
'inputcommon',
|
||||||
'lua',
|
'lua',
|
||||||
'sfml'
|
'sfml-network'
|
||||||
]
|
]
|
||||||
|
|
||||||
env_core = env.Clone();
|
env_core = env.Clone();
|
||||||
|
|
|
@ -31,7 +31,11 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#if defined(SHARED_LZO) && SHARED_LZO
|
||||||
|
#include <lzo/lzo1x.h>
|
||||||
|
#else
|
||||||
#include "minilzo.h"
|
#include "minilzo.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// TODO: Move to namespace
|
// TODO: Move to namespace
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ files = [
|
||||||
]
|
]
|
||||||
|
|
||||||
libs = [
|
libs = [
|
||||||
'core', 'minilzo', 'discio', 'bdisasm', 'videocommon',
|
'core', 'lzo2', 'discio', 'bdisasm', 'videocommon',
|
||||||
'inputcommon', 'common', 'lua', 'z', 'sfml'
|
'inputcommon', 'common', 'lua', 'z', 'sfml-network'
|
||||||
]
|
]
|
||||||
|
|
||||||
if wxenv['HAVE_WX']:
|
if wxenv['HAVE_WX']:
|
||||||
|
|
|
@ -20,7 +20,11 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#if defined(SHARED_SOIL) && SHARED_SOIL
|
||||||
|
#include <SOIL/SOIL.h>
|
||||||
|
#else
|
||||||
#include "SOIL.h"
|
#include "SOIL.h"
|
||||||
|
#endif
|
||||||
#include "CommonPaths.h"
|
#include "CommonPaths.h"
|
||||||
#include "FileUtil.h"
|
#include "FileUtil.h"
|
||||||
#include "FileSearch.h"
|
#include "FileSearch.h"
|
||||||
|
|
|
@ -31,7 +31,7 @@ compileFlags = [
|
||||||
linkFlags = [
|
linkFlags = [
|
||||||
]
|
]
|
||||||
libs = [
|
libs = [
|
||||||
'videocommon', 'soil', 'common'
|
'videocommon', 'SOIL', 'common'
|
||||||
]
|
]
|
||||||
|
|
||||||
gfxenv = env.Clone()
|
gfxenv = env.Clone()
|
||||||
|
|
|
@ -42,7 +42,7 @@ compileFlags = [
|
||||||
linkFlags = [
|
linkFlags = [
|
||||||
]
|
]
|
||||||
libs = [
|
libs = [
|
||||||
'videocommon', 'soil', 'common'
|
'videocommon', 'SOIL', 'common'
|
||||||
]
|
]
|
||||||
|
|
||||||
gfxenv = env.Clone()
|
gfxenv = env.Clone()
|
||||||
|
|
Loading…
Reference in New Issue