Fix for build errors when the media lib was not built.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
34bec08974
commit
72fdc4585e
@ -552,6 +552,19 @@ def makeLibName(name):
|
|||||||
return [libname]
|
return [libname]
|
||||||
|
|
||||||
|
|
||||||
|
def findLib(name, libdirs):
|
||||||
|
name = makeLibName(name)[0]
|
||||||
|
if os.name == 'posix':
|
||||||
|
dirs = libdirs + ['/usr/lib', '/usr/local/lib']
|
||||||
|
name = 'lib'+name
|
||||||
|
else:
|
||||||
|
dirs = libdirs[:]
|
||||||
|
for d in dirs:
|
||||||
|
p = os.path.join(d, name)
|
||||||
|
if glob.glob(p+'*') != []:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def adjustCFLAGS(cflags, defines, includes):
|
def adjustCFLAGS(cflags, defines, includes):
|
||||||
'''Extract the raw -I, -D, and -U flags and put them into
|
'''Extract the raw -I, -D, and -U flags and put them into
|
||||||
|
@ -405,7 +405,7 @@ wxpExtensions.append(ext)
|
|||||||
|
|
||||||
|
|
||||||
mediaLibs = libs[:]
|
mediaLibs = libs[:]
|
||||||
if not MONOLITHIC:
|
if not MONOLITHIC and findLib('media', libdirs):
|
||||||
mediaLibs += makeLibName('media')
|
mediaLibs += makeLibName('media')
|
||||||
swig_sources = run_swig(['media.i'], 'src', GENDIR, PKGDIR,
|
swig_sources = run_swig(['media.i'], 'src', GENDIR, PKGDIR,
|
||||||
USE_SWIG, swig_force, swig_args, swig_deps)
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
||||||
@ -459,7 +459,8 @@ swig_sources = run_swig(['xrc.i'], 'src', GENDIR, PKGDIR,
|
|||||||
'src/_xml.i',
|
'src/_xml.i',
|
||||||
'src/_xmlhandler.i',
|
'src/_xmlhandler.i',
|
||||||
])
|
])
|
||||||
if not MONOLITHIC:
|
|
||||||
|
if not MONOLITHIC and findLib('xrc', libdirs):
|
||||||
xrcLib = makeLibName('xrc')
|
xrcLib = makeLibName('xrc')
|
||||||
else:
|
else:
|
||||||
xrcLib = []
|
xrcLib = []
|
||||||
@ -481,7 +482,7 @@ wxpExtensions.append(ext)
|
|||||||
|
|
||||||
swig_sources = run_swig(['richtext.i'], 'src', GENDIR, PKGDIR,
|
swig_sources = run_swig(['richtext.i'], 'src', GENDIR, PKGDIR,
|
||||||
USE_SWIG, swig_force, swig_args, swig_deps)
|
USE_SWIG, swig_force, swig_args, swig_deps)
|
||||||
if not MONOLITHIC:
|
if not MONOLITHIC and findLib('richtext', libdirs):
|
||||||
richLib = makeLibName('richtext')
|
richLib = makeLibName('richtext')
|
||||||
else:
|
else:
|
||||||
richLib = []
|
richLib = []
|
||||||
@ -507,7 +508,7 @@ swig_sources = run_swig(['aui.i'], 'src', GENDIR, PKGDIR,
|
|||||||
opj(WXDIR, 'include/wx/aui/dockart.h'),
|
opj(WXDIR, 'include/wx/aui/dockart.h'),
|
||||||
opj(WXDIR, 'include/wx/aui/auibook.h'),
|
opj(WXDIR, 'include/wx/aui/auibook.h'),
|
||||||
])
|
])
|
||||||
if not MONOLITHIC:
|
if not MONOLITHIC and findLib('aui', libdirs):
|
||||||
auiLib = makeLibName('aui')
|
auiLib = makeLibName('aui')
|
||||||
else:
|
else:
|
||||||
auiLib = []
|
auiLib = []
|
||||||
|
Loading…
Reference in New Issue
Block a user