mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 03:51:18 +00:00
Linking fix: -lxml2 should be appended after the .o objects when linking to prevent undefined references (and not in LINKFLAGS). Also, FinishBuild was badly indented.
This commit is contained in:
parent
2a8cef7f9e
commit
75cc56d6a3
1 changed files with 19 additions and 17 deletions
36
config.py
36
config.py
|
@ -214,7 +214,7 @@ class Config:
|
||||||
print 'xml2-config failed'
|
print 'xml2-config failed'
|
||||||
assert( False )
|
assert( False )
|
||||||
xml2libs = commands.getoutput( 'xml2-config --libs' )
|
xml2libs = commands.getoutput( 'xml2-config --libs' )
|
||||||
env.Append( LINKFLAGS = xml2libs.split( ' ' ) )
|
env.ParseConfig( 'xml2-config --libs' )
|
||||||
baseflags = [ '-pipe', '-Wall', '-fmessage-length=0', '-fvisibility=hidden', xml2.split( ' ' ) ]
|
baseflags = [ '-pipe', '-Wall', '-fmessage-length=0', '-fvisibility=hidden', xml2.split( ' ' ) ]
|
||||||
|
|
||||||
if ( useGtk ):
|
if ( useGtk ):
|
||||||
|
@ -392,26 +392,28 @@ class Config:
|
||||||
]:
|
]:
|
||||||
shutil.copy( os.path.join( srcdir, x64_dll ), 'install/x64' )
|
shutil.copy( os.path.join( srcdir, x64_dll ), 'install/x64' )
|
||||||
|
|
||||||
def FinishBuild( self, target, source, env ):
|
def FinishBuild( self, target, source, env ):
|
||||||
print( 'Lookup and bundle the PNG and JPEG libraries' )
|
print( 'Lookup and bundle the PNG and JPEG libraries' )
|
||||||
# radiant.bin doesn't link to jpeg lib directly, grab that from a module
|
# radiant.bin doesn't link to jpeg lib directly, grab that from a module
|
||||||
# Python 2.7 only!
|
# Python 2.7 only!
|
||||||
#module_ldd = subprocess.check_output( 'ldd -r install/modules/image.so', shell = True )
|
#module_ldd = subprocess.check_output( 'ldd -r install/modules/image.so', shell = True )
|
||||||
p = subprocess.Popen( 'ldd -r install/modules/image.so', shell = True, stdout = subprocess.PIPE )
|
p = subprocess.Popen( 'ldd -r install/modules/image.so', shell = True, stdout = subprocess.PIPE )
|
||||||
module_ldd = p.communicate()[0]
|
module_ldd = p.communicate()[0]
|
||||||
# print( module_ldd )
|
# print( module_ldd )
|
||||||
|
|
||||||
def find_library( output, libname ):
|
def find_library( output, libname ):
|
||||||
match = filter( lambda l : l.find( libname ) != -1, output.split( '\n' ) )[0]
|
print output
|
||||||
return re.split( '.*=> (.*) .*', match )[1]
|
print libname
|
||||||
|
match = filter( lambda l : l.find( libname ) != -1, output.split( '\n' ) )[0]
|
||||||
|
return re.split( '.*=> (.*) .*', match )[1]
|
||||||
|
|
||||||
jpeg_path = find_library( module_ldd, 'libjpeg' )
|
jpeg_path = find_library( module_ldd, 'libjpeg' )
|
||||||
print( 'JPEG library: %s' % repr( jpeg_path ) )
|
print( 'JPEG library: %s' % repr( jpeg_path ) )
|
||||||
png_path = find_library( module_ldd, 'libpng' )
|
png_path = find_library( module_ldd, 'libpng' )
|
||||||
print( 'PNG library: %s' % repr( png_path ) )
|
print( 'PNG library: %s' % repr( png_path ) )
|
||||||
|
|
||||||
shutil.copy( jpeg_path, 'install' )
|
shutil.copy( jpeg_path, 'install' )
|
||||||
shutil.copy( png_path, 'install' )
|
shutil.copy( png_path, 'install' )
|
||||||
|
|
||||||
# parse the config statement line to produce/update an existing config list
|
# parse the config statement line to produce/update an existing config list
|
||||||
# the configs expose a list of keywords and accepted values, which the engine parses out
|
# the configs expose a list of keywords and accepted values, which the engine parses out
|
||||||
|
|
Loading…
Reference in a new issue