Automatically detect and use shared library packages for
LZO/SFML/SOIL as already done for GLEW/SDL/zlib. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5723 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
d24e5a37a6
commit
ce3eb2a13b
|
@ -0,0 +1 @@
|
|||
#include "minilzo.h"
|
|
@ -0,0 +1 @@
|
|||
#include "SOIL/../SOIL.h"
|
16
SConstruct
16
SConstruct
|
@ -248,8 +248,6 @@ if sys.platform == 'darwin':
|
|||
env['plugin_dir'] = env['prefix'] + 'Dolphin.app/Contents/PlugIns/'
|
||||
env['data_dir'] = env['prefix'] + 'Dolphin.app/Contents/'
|
||||
|
||||
env['LIBPATH'].append(env['local_libs'])
|
||||
|
||||
conf = env.Configure(custom_tests = tests,
|
||||
config_h="Source/Core/Common/Src/Config.h")
|
||||
|
||||
|
@ -276,22 +274,18 @@ shared['glew'] = shared['lzo'] = shared['sdl'] = \
|
|||
shared['soil'] = shared['sfml'] = shared['zlib'] = 0
|
||||
if not sys.platform == 'darwin':
|
||||
shared['glew'] = conf.CheckPKG('GLEW')
|
||||
#shared['lzo'] = conf.CheckPKG('lzo2') XXX
|
||||
shared['lzo'] = conf.CheckPKG('lzo2')
|
||||
shared['sdl'] = conf.CheckPKG('SDL')
|
||||
#shared['soil'] = conf.CheckPKG('SOIL') XXX
|
||||
shared['soil'] = conf.CheckPKG('SOIL')
|
||||
# TODO: Check the version of sfml. It should be at least version 1.5
|
||||
#shared['sfml'] = conf.CheckPKG('sfml-network') and \
|
||||
# conf.CheckCXXHeader("SFML/Network/Ftp.hpp") XXX
|
||||
shared['sfml'] = conf.CheckPKG('sfml-network') and \
|
||||
conf.CheckCXXHeader("SFML/Network/Ftp.hpp")
|
||||
shared['zlib'] = conf.CheckPKG('z')
|
||||
for lib in shared:
|
||||
if not shared[lib]:
|
||||
print "Shared library " + lib + " not detected, " \
|
||||
"falling back to the static library"
|
||||
|
||||
conf.Define('SHARED_SOIL', shared['soil'])
|
||||
conf.Define('SHARED_LZO', shared['lzo'])
|
||||
conf.Define('SHARED_SFML', shared['sfml'])
|
||||
|
||||
if shared['glew'] == 0:
|
||||
env['CPPPATH'] += [basedir + 'Externals/GLew/include']
|
||||
dirs += ['Externals/GLew']
|
||||
|
@ -433,6 +427,8 @@ conf.Define('USE_OPROFILE', env['USE_OPROFILE'])
|
|||
# After all configuration tests are done
|
||||
conf.Finish()
|
||||
|
||||
env['LIBPATH'].append(env['local_libs'])
|
||||
|
||||
rev = utils.GenerateRevFile(env['flavor'],
|
||||
"Source/Core/Common/Src/svnrev_template.h",
|
||||
"Source/Core/Common/Src/svnrev.h")
|
||||
|
|
|
@ -31,11 +31,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#if defined(SHARED_LZO) && SHARED_LZO
|
||||
#include <lzo/lzo1x.h>
|
||||
#else
|
||||
#include "minilzo.h"
|
||||
#endif
|
||||
|
||||
// TODO: Move to namespace
|
||||
|
||||
|
|
|
@ -20,11 +20,7 @@
|
|||
#include <cstring>
|
||||
#include <utility>
|
||||
#include <algorithm>
|
||||
#if defined(SHARED_SOIL) && SHARED_SOIL
|
||||
#include <SOIL/SOIL.h>
|
||||
#else
|
||||
#include "SOIL.h"
|
||||
#endif
|
||||
#include "CommonPaths.h"
|
||||
#include "FileUtil.h"
|
||||
#include "FileSearch.h"
|
||||
|
|
Loading…
Reference in New Issue