mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
added scons wxconfig=path flag
fixed lib detection git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1472 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -102,6 +102,7 @@ vars.AddVariables(
|
|||||||
allowed_values = ('release', 'devel', 'debug'),
|
allowed_values = ('release', 'devel', 'debug'),
|
||||||
ignorecase = 2
|
ignorecase = 2
|
||||||
),
|
),
|
||||||
|
PathVariable('wxconfig', 'Path to the wxconfig', None),
|
||||||
('CC', 'The c compiler', 'gcc'),
|
('CC', 'The c compiler', 'gcc'),
|
||||||
('CXX', 'The c++ compiler', 'g++'),
|
('CXX', 'The c++ compiler', 'g++'),
|
||||||
)
|
)
|
||||||
|
@ -18,7 +18,7 @@ def CheckPKGConfig(context, version):
|
|||||||
|
|
||||||
def CheckFramework(context, name):
|
def CheckFramework(context, name):
|
||||||
ret = 0
|
ret = 0
|
||||||
if (platform.system() == 'darwin'):
|
if (platform.system().lower() == 'darwin'):
|
||||||
context.Message( '\nLooking for framework %s... ' % name )
|
context.Message( '\nLooking for framework %s... ' % name )
|
||||||
lastLINKFLAGS = context.env['LINKFLAGS']
|
lastLINKFLAGS = context.env['LINKFLAGS']
|
||||||
context.env.Append(LINKFLAGS = [ '-framework', name ])
|
context.env.Append(LINKFLAGS = [ '-framework', name ])
|
||||||
@ -32,18 +32,19 @@ def CheckFramework(context, name):
|
|||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
# TODO: We should use the scons one instead
|
||||||
def CheckLib(context, name):
|
def CheckLib(context, name):
|
||||||
context.Message( 'Looking for lib %s... ' % name )
|
context.Message( 'Looking for lib %s... ' % name )
|
||||||
lastLIBS = context.env['LIBS']
|
lastLIBS = context.env['LIBS']
|
||||||
context.env.Append(LIBS = name)
|
context.env.Append(LIBS = [name])
|
||||||
ret = context.TryLink("""
|
ret = context.TryLink("""
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
""",'.c')
|
""",'.c')
|
||||||
if not ret:
|
if not ret:
|
||||||
context.env.Replace(LIBS = lastLIBS)
|
context.env.Replace(LIBS = lastLIBS)
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def ConfigPKG(context, name):
|
def ConfigPKG(context, name):
|
||||||
|
@ -104,6 +104,9 @@ def CheckWXConfigPosixFind(context, debug):
|
|||||||
# Find a wx-config compatible pathname
|
# Find a wx-config compatible pathname
|
||||||
# wx*-config --> wx*-[0-9]+\.[0-9]+-config / wx<platform>-<version>-config
|
# wx*-config --> wx*-[0-9]+\.[0-9]+-config / wx<platform>-<version>-config
|
||||||
|
|
||||||
|
if (context.env['wxconfig']):
|
||||||
|
return context.env['wxconfig']
|
||||||
|
|
||||||
dbglist = []
|
dbglist = []
|
||||||
rellist = []
|
rellist = []
|
||||||
cfgre = re.compile('.*?\/wx(\w+?)(d?)-(\d+\.\d+)-config')
|
cfgre = re.compile('.*?\/wx(\w+?)(d?)-(\d+\.\d+)-config')
|
||||||
@ -167,14 +170,17 @@ def CheckWXConfig(context, version, components, debug = False):
|
|||||||
context.env['wxconfig_postargs']= ''
|
context.env['wxconfig_postargs']= ''
|
||||||
|
|
||||||
# Try to find it in path
|
# Try to find it in path
|
||||||
wx_prog = context.env.WhereIs('wx-config')
|
try:
|
||||||
if wx_prog == None:
|
context.env['wxconfig']
|
||||||
# You could supply wx-config.exe as a fallback option.
|
except KeyError:
|
||||||
#wx_prog = os.path.join('scons','wx-config')
|
wx_prog = context.env.WhereIs('wx-config')
|
||||||
context.Message('wx-config not found...')
|
if wx_prog == None:
|
||||||
return False
|
# You could supply wx-config.exe as a fallback option.
|
||||||
context.env['wxconfig'] = wx_prog
|
#wx_prog = os.path.join('scons','wx-config')
|
||||||
|
context.Message('wx-config not found...')
|
||||||
|
return False
|
||||||
|
context.env['wxconfig'] = wx_prog
|
||||||
|
|
||||||
# Get wx-config invocation and check version
|
# Get wx-config invocation and check version
|
||||||
if context.env['PLATFORM'] == 'win32':
|
if context.env['PLATFORM'] == 'win32':
|
||||||
res = CheckWXConfigWin(context, version, debug)
|
res = CheckWXConfigWin(context, version, debug)
|
||||||
|
Reference in New Issue
Block a user