Better hack for library checking on OS X
This commit is contained in:
parent
e8817489be
commit
0cf117a5f0
@ -209,12 +209,16 @@ def CheckBit(context):
|
||||
def CheckFramework(context, framework):
|
||||
import SCons.Conftest
|
||||
#Extreme hack, TODO: maybe think of a better one (like replicating CheckLib here) or at least just fix the message
|
||||
ret = SCons.Conftest.CheckLib(context, ['m" -framework {0}"'.format(framework)], autoadd = 0)
|
||||
oldLinkFlags = context.env.Append(LINKFLAGS=["-framework", framework])
|
||||
context.Display("Checking for Darwin Framework {0}...".format(framework))
|
||||
ret = SCons.Conftest.CheckLib(context, ["m"], autoadd = 0)
|
||||
context.did_show_result = 1
|
||||
if not ret:
|
||||
context.env.Append(LINKFLAGS=["-framework", framework])
|
||||
if framework != "Cocoa":
|
||||
env.Append(CPPPATH=['/Library/Frameworks/{0}.framework/Headers/'.format(framework)])
|
||||
else:
|
||||
context.env.Replace(LINKFLAGS=oldLinkFlags)
|
||||
return not ret
|
||||
|
||||
#function that finds libraries and appends them to LIBS
|
||||
|
Loading…
Reference in New Issue
Block a user