diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-09 06:41:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-09 06:41:55 +0000 |
commit | 8bec1dda934fa75cbb1402c58cb879b23305dc40 (patch) | |
tree | b4294963397117f1cf022e7a62452697df996de3 /src/SConscript | |
download | abakus-8bec1dda934fa75cbb1402c58cb879b23305dc40.tar.gz abakus-8bec1dda934fa75cbb1402c58cb879b23305dc40.zip |
Add abakus
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/abakus@1071969 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/SConscript')
-rw-r--r-- | src/SConscript | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/src/SConscript b/src/SConscript new file mode 100644 index 0000000..66e701d --- /dev/null +++ b/src/SConscript @@ -0,0 +1,81 @@ +#! /usr/bin/env python +## This script demonstrates how to build and install +## a simple kde program having KconfigXT settings +## with scons +## +## Thomas Nagy, 2004, 2005 + +## This file can be reused freely for any project (see COPYING) + +############################ +## load the config + +## Use the environment and the tools set in the top-level +## SConstruct file (set with 'Export') - this is very important + +Import( 'env' ) +myenv=env.Copy() + +############################# +## the programs to build + +# The sources for our program - only .ui, .skel and .cpp are accepted +abakus_sources = """ +abakus.cpp +abakuslistview.cpp +dragsupport.cpp +editor.cpp +evaluator.cpp +function.cpp +lexer_lex.cpp +mainwindow.cpp +node.cpp +numerictypes.cpp +parser_yacc.cpp +result.cpp +resultlistview.cpp +resultlistviewtext.cpp +rpnmuncher.cpp +valuemanager.cpp +dcopIface.skel +""" + +if myenv.get('mpfr', 'no') == 'yes': + myenv.Append(LIBS = ['mpfr', 'gmp']) +else: + abakus_sources = abakus_sources + " hmath.cpp number.c" + +myenv.KDEprogram( "abakus", abakus_sources ) +myenv.KDEicon( 'abakus' ) + +# Mark these as being created by flex and bison if it's installed. +if myenv.Dictionary().has_key('PARSER_INCLUDED'): + myenv.CXXFile( "lexer_lex.cpp", "lexer.ll" ) + myenv.CXXFile( "parser_yacc.cpp", "parser.yy", YACCFLAGS="-d" ) + +if myenv['HAVE_ASNEEDED']: + myenv.Append(LINKFLAGS = '-Wl,--as-needed') + +myenv.Append(CXXFLAGS = '-Wno-non-virtual-dtor') + +############################ +## Customization + +## Additional include paths for compiling the source files +## Always add '../' (top-level directory) because moc makes code that needs it +myenv.KDEaddpaths_includes('#/src/ #/') + +## Necessary libraries to link against +myenv.KDEaddlibs( 'qt-mt kio kdecore kdeprint kdeui' ) + +############################# +## Data to install + +## The ui.rc file and the tips go into datadir/appname/ +myenv.KDEinstall( 'KDEDATA', 'abakus', 'abakusui.rc' ) + +## Warning : there is a difference between the normal destop file used for the menu +## and the servicetype desktop file, so they go in different directories +## you will find more information in 'test3' +myenv.KDEinstall( 'KDEMENU', 'Utilities', 'abakus.desktop') + |