LUMIERA.clone/src/SConscript
Ichthyostega 9c74466778 Tests: build an link a test-support library
This is something I wanted to clean-up since a very long time indeed,
but always postponed it, since it requires a lot of nasty clean-up and disentangling....

Several parts had been stashed away into `src/lib/test`, which are not really related:
 * the testrunner and testsuite builder
 * generic helper utilities
 * specialised test-support facilities, e.g. the EventLog

This changeset introduces a new top-level test folder and a namespace `::test`
Code from this folder is linked into a shared library `libtestsupport.so`,
which resides in the linkage hierarchy between »Vessel« and »Vault«,
yet is no longer part of the Lumiera application and only linked into the test-suite.
2026-03-06 23:16:32 +01:00

56 lines
2.2 KiB
Python

# -*- python -*-
##
## SConscript - SCons buildscript for the Lumiera Application.
## Definitions how to build the main tree
##
from Buildhelper import srcSubtree
from Buildhelper import scanSubtree
Import('env icons config')
# define the source file/dirs comprising each artifact to be built.
lLib = env.SharedLibrary('lumierasupport', srcSubtree('lib'), install=True)
lApp = env.SharedLibrary('lumieravessel', srcSubtree('vessel'),addLibs=lLib, install=True)
lVault = env.SharedLibrary('lumieravault', srcSubtree('vault'), addLibs=lLib+lApp, install=True)
lSteam = env.SharedLibrary('lumierasteam', srcSubtree('steam'), addLibs=lLib+lApp+lVault, install=True)
# in reverse dependency order
core = lSteam+lVault+lApp+lLib # used to build the core application
support_lib = lLib # use to link against the support lib only
vessel_lib = lApp+support_lib # use to link against the application-framework
vault_lib = lVault+vessel_lib # use to link against the low-level backend
core_lib = lSteam+vault_lib # use to link against the core application
lumiera = ( env.Program('lumiera', ['lumiera/main.cpp'] + core, install=True)
+ config
)
# Install the lumiera application:
# symlink the executable into the bin dir
env.SymLink('$DESTDIR/bin/lumiera',env.path.installExe+'lumiera','../lib/lumiera/lumiera')
# Unit/Integration test support
test_support = env.SharedLibrary('testsupport', srcSubtree('test'), addLibs=vessel_lib, install=False)
# building Lumiera Plugins
plugins = [] # currently none
# the Lumiera GTK GUI
envGtk = env.Clone()
envGtk.mergeConf(['gtkmm-3.0','sigc++-2.0','gthread-2.0','cairomm-1.0','gdl','xv','x11','xext','sm'])
guimodule = envGtk.LumieraPlugin('gtk_gui', srcSubtree('stage') + core, install=True)
resources = ( [env.GuiResource(f) for f in scanSubtree('stage', ['*.css'])] # note: collected into one target dir
)
gui = ( guimodule
+ resources
+ icons
)
Export('lumiera core core_lib vessel_lib vault_lib support_lib test_support plugins envGtk guimodule gui')