# SConstruct file for CLAM vmqt from buildtools import * from buildtools.include_rename import * from buildtools.pkggen import PackageData from buildtools.file_retriever import FileRetriever from buildtools.rulesets import * import os, sys Import('vmqt_env version top install_dirs header_db') def define_module_contents() : print "Gathering necessary source files...", if not os.path.exists('CLAM' ) : os.makedirs('CLAM') basedir = top+'/..' qtvm_base = 'src/Visualization/QTVM/' folders = ['Controllers','DirectPlots','Network/Controllers','Network/Plots','Network/Processings','Network/Renderers','Network/Surfaces','Network/Utils','Players','Plots','Renderers','Surfaces','SysPlot','Utils','Widgets','Widgets/BPFEditor','Widgets/Label','Widgets/Misc','Widgets/Playable','Widgets/Rulers','Widgets/Scroll'] folders = [ qtvm_base+folder for folder in folders] folders.append(qtvm_base) blacklist = [] file_retriever = FileRetriever( basedir, folders, blacklist ) file_retriever.out_src = 'CLAM' file_retriever.out_inc = 'CLAM' file_retriever.scan() store_headers_in_db( header_db ) for filename in file_retriever.headers : update_includes( header_db, filename ) for filename in file_retriever.sources : update_includes( header_db, filename ) manifest = Manifest() manifest.store( file_retriever.headers, file_retriever.sources ) print "ok" return file_retriever.headers, file_retriever.sources if not vmqt_env.GetOption('clean') : print """\ #################################################################### ### BOOTSTRAPPING CLAM QT-BASED VISUALIZATION MODULE LIBRARY ### ####################################################################""" print "Creating pkg-config descriptor...", pkg_data = PackageData( 'clam_vmqt', version, [] ) pkg_data.create_pkg_descriptor( vmqt_env, 'clam_vmqt.pc' ) print "ok" if not vmqt_env.GetOption('clean') : header_files, source_files = define_module_contents() else : manifest = Manifest() header_files = [] source_files = [] manifest.load( header_files, source_files ) headers = [ File(header) for header in header_files ] vmqt_env.Prepend(CPPPATH=['.','../core/include','../processing/include','../audioio/include']) if not vmqt_env.GetOption('clean') : handle_preinclude( vmqt_env ) vmqt_env.Append(LIBS=['clam_core', 'clam_processing','clam_audioio']) #if sys.platform == 'win32' : # vmqt_env.Append( LIBS=['clam_core_templates'] ) vmqt_env.Prepend(LIBPATH=['../core','../processing','../audioio']) if sys.platform != 'win32' : vmqt_tgt, vmqt_install_tgt = posix_lib_rules( 'vmqt', version, headers, source_files, install_dirs, vmqt_env ) else : vmqt_tgt, vmqt_install_tgt = win32_lib_rules( 'vmqt', version, headers, source_files, install_dirs, vmqt_env ) Return( 'vmqt_tgt', 'vmqt_install_tgt' )