Build: improve declared library dependencies
- dependency on X-Lib explicit - always link explicitly agrainst lib rt - enforce strict dependencies on dynamic modules (--no-undefined) These changes were included in 0.pre.02-1 and applied to master
This commit is contained in:
parent
65b5ea9df0
commit
9d2220553f
5 changed files with 14 additions and 14 deletions
|
|
@ -56,6 +56,10 @@ def configure(env):
|
||||||
conf.env.Append(CPPFLAGS = ' -DHAVE_PTHREAD')
|
conf.env.Append(CPPFLAGS = ' -DHAVE_PTHREAD')
|
||||||
conf.env.Append(CCFLAGS = ' -pthread')
|
conf.env.Append(CCFLAGS = ' -pthread')
|
||||||
|
|
||||||
|
if not conf.CheckLib(symbol='clock_gettime', library='rt'):
|
||||||
|
problems.append('We expect the POSIX realtime extensions to be available through librt. ' +
|
||||||
|
'Unable to use clock_gettime()')
|
||||||
|
|
||||||
if conf.CheckCHeader('execinfo.h'):
|
if conf.CheckCHeader('execinfo.h'):
|
||||||
conf.env.Append(CPPFLAGS = ' -DHAVE_EXECINFO_H')
|
conf.env.Append(CPPFLAGS = ' -DHAVE_EXECINFO_H')
|
||||||
|
|
||||||
|
|
@ -89,12 +93,6 @@ def configure(env):
|
||||||
problems.append('We need the boost regular expression lib (incl. binary lib for linking).')
|
problems.append('We need the boost regular expression lib (incl. binary lib for linking).')
|
||||||
|
|
||||||
|
|
||||||
if conf.CheckLib(symbol='clock_gettime'):
|
|
||||||
print 'Using function clock_gettime() as defined in the C-lib...'
|
|
||||||
else:
|
|
||||||
if not conf.CheckLib(symbol='clock_gettime', library='rt'):
|
|
||||||
problems.append('No library known to provide the clock_gettime() function.')
|
|
||||||
|
|
||||||
if not conf.CheckPkgConfig('gavl', 1.0):
|
if not conf.CheckPkgConfig('gavl', 1.0):
|
||||||
problems.append('Did not find Gmerlin Audio Video Lib [http://gmerlin.sourceforge.net/gavl.html].')
|
problems.append('Did not find Gmerlin Audio Video Lib [http://gmerlin.sourceforge.net/gavl.html].')
|
||||||
else:
|
else:
|
||||||
|
|
@ -129,6 +127,7 @@ def configure(env):
|
||||||
problems.append('Xlib.h and Xutil.h required. Please install libx11-dev.')
|
problems.append('Xlib.h and Xutil.h required. Please install libx11-dev.')
|
||||||
|
|
||||||
if not conf.CheckPkgConfig('xv') : problems.append('Need libXv...')
|
if not conf.CheckPkgConfig('xv') : problems.append('Need libXv...')
|
||||||
|
if not conf.CheckPkgConfig('x11') : problems.append('Need X-lib...') # for the xvdisplayer widget
|
||||||
if not conf.CheckPkgConfig('xext'): problems.append('Need libXext.')
|
if not conf.CheckPkgConfig('xext'): problems.append('Need libXext.')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ def defineBuildEnvironment():
|
||||||
, CXXFLAGS='-Wno-enum-compare'
|
, CXXFLAGS='-Wno-enum-compare'
|
||||||
, CFLAGS='-std=gnu99'
|
, CFLAGS='-std=gnu99'
|
||||||
)
|
)
|
||||||
|
env.Append(LINKFLAGS='-Wl,--no-undefined') # require every dependency is given on link, in the right order
|
||||||
handleVerboseMessages(env)
|
handleVerboseMessages(env)
|
||||||
handleNoBugSwitches(env)
|
handleNoBugSwitches(env)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ Libraries
|
||||||
- libgtkmm-2.4-dev
|
- libgtkmm-2.4-dev
|
||||||
- libcairomm-1.0-dev
|
- libcairomm-1.0-dev
|
||||||
- libglibmm-2.4-dev, requiring glib2.0 and gthread-2.0
|
- libglibmm-2.4-dev, requiring glib2.0 and gthread-2.0
|
||||||
- libxv-dev
|
- libxv-dev and X-lib footnote:[for the XV viewer widget `gui/output/xvdisplayer.cpp`]
|
||||||
- librsvg-2.0 and librsvg2-dev for rendering Icons
|
- librsvg-2.0 and librsvg2-dev for rendering Icons
|
||||||
- libgdl-1-dev -- old version of the Gnome Docking Library footnote:[GDL isn't directly related to GNOME any more.
|
- libgdl-1-dev -- old version of the Gnome Docking Library footnote:[GDL isn't directly related to GNOME any more.
|
||||||
We contributed to the improvement of this library in the past. These improvements went upstream
|
We contributed to the improvement of this library in the past. These improvements went upstream
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,10 @@ Import('env icons config')
|
||||||
|
|
||||||
# define the source file/dirs comprising each artifact to be built.
|
# define the source file/dirs comprising each artifact to be built.
|
||||||
|
|
||||||
lLib = env.SharedLibrary('lumierasupport', srcSubtree('lib'), install=True)
|
lLib = env.SharedLibrary('lumierasupport', srcSubtree('lib'), install=True)
|
||||||
lApp = env.SharedLibrary('lumieracommon', srcSubtree('common'), install=True)
|
lApp = env.SharedLibrary('lumieracommon', srcSubtree('common'), addLibs=lLib, install=True)
|
||||||
lBack = env.SharedLibrary('lumierabackend', srcSubtree('backend'), install=True)
|
lBack = env.SharedLibrary('lumierabackend', srcSubtree('backend'),addLibs=lLib+lApp, install=True)
|
||||||
lProc = env.SharedLibrary('lumieraproc', srcSubtree('proc'), install=True)
|
lProc = env.SharedLibrary('lumieraproc', srcSubtree('proc'), addLibs=lLib+lApp+lBack, install=True)
|
||||||
|
|
||||||
core = lProc+lBack+lApp+lLib # in reverse dependency order
|
core = lProc+lBack+lApp+lLib # in reverse dependency order
|
||||||
support_lib = lLib
|
support_lib = lLib
|
||||||
|
|
@ -37,7 +37,7 @@ plugins = [] # currently none
|
||||||
|
|
||||||
# the Lumiera GTK GUI
|
# the Lumiera GTK GUI
|
||||||
envGtk = env.Clone()
|
envGtk = env.Clone()
|
||||||
envGtk.mergeConf(['gtkmm-2.4','gthread-2.0','cairomm-1.0','gdl','xv','xext','sm'])
|
envGtk.mergeConf(['gtkmm-2.4','gthread-2.0','cairomm-1.0','gdl','xv','x11','xext','sm'])
|
||||||
envGtk.Append(LIBS=core)
|
envGtk.Append(LIBS=core)
|
||||||
|
|
||||||
guimodule = envGtk.LumieraPlugin('gtk_gui', srcSubtree('gui'), install=True)
|
guimodule = envGtk.LumieraPlugin('gtk_gui', srcSubtree('gui'), install=True)
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ def testCases(env,dir):
|
||||||
testlib = []
|
testlib = []
|
||||||
testClasses = list(scanSubtree(dir,['*.cpp']))
|
testClasses = list(scanSubtree(dir,['*.cpp']))
|
||||||
if testClasses:
|
if testClasses:
|
||||||
testlib = sharedTestLibs[dir] = env.SharedLibrary('test-'+dir, testClasses)
|
testlib = sharedTestLibs[dir] = env.SharedLibrary('test-'+dir, testClasses, addLibs=core_lib) ### TICKET #938 : should be: addLibs=linkContext(dir))
|
||||||
|
|
||||||
# pick up standalone plain-C tests
|
# pick up standalone plain-C tests
|
||||||
standaloneTests = list(scanSubtree(dir,['test-*.c']))
|
standaloneTests = list(scanSubtree(dir,['test-*.c']))
|
||||||
|
|
@ -74,7 +74,7 @@ testrunner = env.Program("test-suite", ["testrunner.cpp"]+testLibs+core_lib)
|
||||||
|
|
||||||
testsuite = ( testcases
|
testsuite = ( testcases
|
||||||
+ testrunner
|
+ testrunner
|
||||||
+ createPlugins(env, 'plugin')
|
+ createPlugins(env, 'plugin', addLibs=core_lib)
|
||||||
+ env.File(glob('*.tests')) # depend explicitly on the test definition files for test.sh
|
+ env.File(glob('*.tests')) # depend explicitly on the test definition files for test.sh
|
||||||
+ config
|
+ config
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue