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:
Soren Jorvang 2010-06-16 12:42:49 +00:00
parent d24e5a37a6
commit ce3eb2a13b
5 changed files with 8 additions and 18 deletions

1
Externals/LZO/lzo/lzo1x.h vendored Normal file
View File

@ -0,0 +1 @@
#include "minilzo.h"

1
Externals/SOIL/SOIL/SOIL.h vendored Normal file
View File

@ -0,0 +1 @@
#include "SOIL/../SOIL.h"

View File

@ -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")

View File

@ -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

View File

@ -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"