## This script demonstrates to build and install ## a kde program having a dcop interface and a client ## for it with scons ## ## Thomas Nagy, 2004 ## This file can be reused freely for any project (see COPYING) ############################ ## load the config ## use the environment set in the top-level ## SConstruct file Import( "env" ) myenv=env.Copy() ############################# ## the programs to build test2_sources = [ 'main.cpp', 'test2.cpp', 'test2view.cpp', 'pref.cpp', 'test2iface_skel.cpp' # use this to indicate the .h file to process ] test2_client_sources = [ 'test2_client.cpp' ] # main program ## By default, the header (.h) files corresponding to source (.cpp) files ## are scanned to find the moc and dcop interfaces to process ## If a header is unreachable (the correponding implementation is ## to be generated), you will have to tell scons explicitely like in ## the following example : myenv.Dcop( ['test2iface.h'] ) myenv.Program( target = "test2", source = test2_sources ) # client myenv.Program( target = "test2_client", source = test2_client_sources ) ############################ ## customization ## additional paths for compiling the source files myenv.Append(CPPPATH = ['./', '../']) ## necessary libraries myenv['LIBS'].append('kio') myenv['LIBS'].append('kdecore') myenv['LIBS'].append('kdeprint') ## this shows how to add other link flags #myenv['LINKFLAGS'].append('-export-dynamic') ############################# ## the install targets if env['INSTALL_ALL'] == 1: ## the main program env['INST_TARGETS'].append( env.Install( env['KDEBIN'], 'test2' ) ) ## the dcop client env['INST_TARGETS'].append( env.Install( env['KDEBIN'], 'test2_client' ) ) ## the rc file env['INST_TARGETS'].append( env.Install( env['KDEDATA']+'/test2', 'test2ui.rc' ) ) ## the desktop file env['INST_TARGETS'].append( env.Install( env['KDEMENU']+'/Utilities', 'test2.desktop' ) )