summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-01-01 23:01:33 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2011-01-01 23:01:33 +0100
commit75f14984fa648c66ba6677f0d7c84429169e95f1 (patch)
tree78c810c65bdd389302b373d74b6547047d6a6ac1 /SConstruct
parentaf8eb4386b8c2d898366d3892c343105ae9ea4e0 (diff)
Call Exit in SConstruct when CheckLib fails, check SOCI for headers instead of lib.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct15
1 files changed, 6 insertions, 9 deletions
diff --git a/SConstruct b/SConstruct
index 1fb9ca4..b3c7009 100644
--- a/SConstruct
+++ b/SConstruct
@@ -6,16 +6,13 @@ if env['PLATFORM'] == 'darwin':
env.Append(LIBS = ['boost_system', 'boost_filesystem', 'boost_regex', 'boost_thread', 'boost_program_options', 'mp3lame', 'soci_core'])
else:
conf = Configure(env)
- conf.CheckLib('boost_system-mt')
- conf.CheckLib('boost_filesystem-mt')
- conf.CheckLib('boost_regex-mt')
- conf.CheckLib('boost_thread-mt')
- conf.CheckLib('boost_program_options-mt')
- conf.CheckLib('mp3lame')
- conf.CheckLib('soci_core')
- env = conf.Finish()
+ for lib in ['boost_system-mt', 'boost_filesystem-mt', 'boost_regex-mt','boost_thread-mt', 'boost_program_options-mt', 'mp3lame']:
+ if not conf.CheckLib(lib):
+ Exit(1)
# scons' CheckLib doesn't seem to find soci_core
- env.Append(LIBS = ['soci_core'])
+ if conf.CheckCXXHeader('soci/soci.h'):
+ env.Append(LIBS = ['soci_core'])
+ env = conf.Finish()
if GetOption('release'):
env.Append(CCFLAGS = ['-O2'])