Skip to content

Commit

Permalink
slight more portable scons
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Aug 20, 2009
1 parent a25ded0 commit 65c9078
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@ if 'darwin' == os.sys.platform:
env.Append(CPPPATH=['/opt/local/include'],
LIBPATH=['/opt/local/lib'])

env.Program('mount-gridfs', 'fs.cpp', LIBS=['mongoclient', 'boost_thread-mt',
'boost_filesystem-mt',
'boost_system-mt', 'fuse'])
conf = Configure( env )
libs = [ "mongoclient" , "fuse" ]
boostLibs = [ "thread" , "filesystem" ]

def checkLib( n ):
if conf.CheckLib( n ):
return True
print( "Error: can't find library: " + str( n ) )
Exit(-1)
return False

for x in libs:
checkLib( x )

def makeBoost( x ):
# this will have to get more complicated later
return "boost_" + x + "-mt";

for x in boostLibs:
checkLib( makeBoost( x ) )

conf.CheckLib( makeBoost( "system" ) )

env = conf.Finish()

env.Program('mount-gridfs', 'fs.cpp' )

0 comments on commit 65c9078

Please sign in to comment.