code cleanup
[dashstudio.git] / configure.rb
blob896901c6c3707bd86de3a44f3061064cc0043322
2 ok = false
3 begin
4 ok = require 'qonf/configure'
5 ok = ok and require 'qonf/info'
6 ok = ok and require 'qonf/dlibconfig.rb'
7 rescue
8 ensure
9         if not ok
10                 puts "=> Error: Seems like you do no have DLib tools in your RUBYLIB"
11         end
12 end
14 conf = RQonf::Configure.new(ARGV)
16 if conf.hasArgument?("help") or conf.hasArgument?("h")
17         puts <<_EOH_
18 Use: #{$0} [options]
19         options:
20                 --help, -h:                                     Show this message
21                 --prefix=[prefix], -prefix [prefix]:            Sets prefix
22                 --with-debug:                                   Enable debug
23                 --yamf-prefix=[yamf prefix]                     Sets the directory where yamf is installed
24 _EOH_
25         exit 0
26 end
28 conf.verifyQtVersion("4.2.0")
29 config = RQonf::Config.new
31 config.addModule("xml")
32 config.addModule("svg")
34 config.addIncludePath RQonf::CONFIG["includepath"]
35 config.addLib "-L #{RQonf::CONFIG["libdir"]} -ldmedia -ldgui -ldgraphics -ldcore -lideality" 
37 if conf.hasArgument?("yamf-prefix")
38         yamf_prefix = File.expand_path(conf.argumentValue("yamf-prefix"))
39         config.addIncludePath "#{yamf_prefix}/include"
40         config.addLib "-L#{yamf_prefix}/lib -lyamf_common -lyamf_model -lyamf_drawing -lyamf_item -lyamf_tools -lyamf_gui"
41 end
43 config.addDefine RQonf::CONFIG["defines"]
44 config.addDefine "_BUILD_DASH_"
45 config.addDefineString "DASH_INSTALL_PREFIX", %@"#{File.expand_path(conf.destdir)}"@
47 config.save("src/config.pri")
49 conf.createMakefiles