mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
scons smarter on windows
This commit is contained in:
parent
d586d7f9d9
commit
12293c0b3b
15
SConstruct
15
SConstruct
@ -480,10 +480,13 @@ if GetOption( "prefix" ):
|
|||||||
installDir = GetOption( "prefix" )
|
installDir = GetOption( "prefix" )
|
||||||
|
|
||||||
def findVersion( root , choices ):
|
def findVersion( root , choices ):
|
||||||
for c in choices:
|
if not isinstance(root, list):
|
||||||
if ( os.path.exists( root + c ) ):
|
root = [root]
|
||||||
return root + c
|
for r in root:
|
||||||
raise "can't find a version of [" + root + "] choices: " + choices
|
for c in choices:
|
||||||
|
if ( os.path.exists( r + c ) ):
|
||||||
|
return r + c
|
||||||
|
raise RuntimeError("can't find a version of [" + repr(root) + "] choices: " + repr(choices))
|
||||||
|
|
||||||
def choosePathExist( choices , default=None):
|
def choosePathExist( choices , default=None):
|
||||||
for c in choices:
|
for c in choices:
|
||||||
@ -610,8 +613,8 @@ elif "win32" == os.sys.platform:
|
|||||||
env.Append( LIBPATH=[ javaHome + "/Lib" ] )
|
env.Append( LIBPATH=[ javaHome + "/Lib" ] )
|
||||||
javaLibs += [ "jvm" ];
|
javaLibs += [ "jvm" ];
|
||||||
|
|
||||||
winSDKHome = findVersion( "C:/Program Files/Microsoft SDKs/Windows/" ,
|
winSDKHome = findVersion( [ "C:/Program Files/Microsoft SDKs/Windows/", "C:/Program Files (x86)/Microsoft SDKs/Windows/" ] ,
|
||||||
[ "v6.0" , "v6.0a" , "v6.1" ] )
|
[ "v6.0" , "v6.0a" , "v6.1", "v7.0A" ] )
|
||||||
|
|
||||||
env.Append( CPPPATH=[ boostDir , "pcre-7.4" , winSDKHome + "/Include" ] )
|
env.Append( CPPPATH=[ boostDir , "pcre-7.4" , winSDKHome + "/Include" ] )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user