Class: BuildTool::BuildSystem::Qt
Defined Under Namespace
Classes: MakeError, QMakeError
Instance Attribute Summary
Attributes inherited from Base
#defaults, #feature, #module, #out_of_source
Instance Method Summary
collapse
Methods inherited from Base
#[], #[]=, #active?, #append, #build_directory, #check_build_directory, #dup, #env, #initialize, #install_prefix, #option_hash, #option_names, #option_set?, #parent, #prepend, #recipe, #remove_build_directory, #set, #source_directory, #to_s
Instance Method Details
Execute a cmake command in the context of the build directory
36
37
38
39
40
41
42
|
# File 'lib/build-tool/build-system/qt.rb', line 36
def _configure( command, wd = build_directory )
rc = self.class.execute "#{source_directory}/configure #{command}", wd, env
if rc != 0
raise QMakeError, "configure failed with error #{rc}!"
end
rc
end
|
#after_rebase ⇒ Object
44
45
46
47
48
|
# File 'lib/build-tool/build-system/qt.rb', line 44
def after_rebase
if configured?
rc = self.class.execute( "bin/syncqt", build_directory, self.module.environment.values )
end
end
|
50
51
52
53
54
55
56
57
|
# File 'lib/build-tool/build-system/qt.rb', line 50
def configure
check_build_directory( true )
opt = ""
opt += " -prefix #{install_prefix.to_s} " if install_prefix
opt += self['flags']
rc = _configure opt
rc
end
|
Check if the module is configured
23
24
25
|
# File 'lib/build-tool/build-system/qt.rb', line 23
def configured?
Pathname.new( build_directory ).join( 'Makefile' ).exist?
end
|
#do_make(target = nil) ⇒ Object
59
60
61
62
63
64
65
|
# File 'lib/build-tool/build-system/qt.rb', line 59
def do_make( target = nil )
rc = self.class.execute( "make #{target ? target : "" }", build_directory, self.module.environment.values )
if rc != 0
raise MakeError, "make #{target || "" } failed with error code #{rc}";
end
rc
end
|
#install(fast) ⇒ Object
67
68
69
|
# File 'lib/build-tool/build-system/qt.rb', line 67
def install( fast )
make( "install" )
end
|
#install_fast_supported? ⇒ Boolean
71
72
73
|
# File 'lib/build-tool/build-system/qt.rb', line 71
def install_fast_supported?
true
end
|
#intitialize(*args) ⇒ Object
14
15
16
|
# File 'lib/build-tool/build-system/qt.rb', line 14
def intitialize( *args )
super( *args )
end
|
#make(target = nil) ⇒ Object
75
76
77
|
# File 'lib/build-tool/build-system/qt.rb', line 75
def make( target = nil )
do_make( target )
end
|
#name ⇒ Object
27
28
29
|
# File 'lib/build-tool/build-system/qt.rb', line 27
def name
"qt"
end
|
80
81
82
83
84
85
|
# File 'lib/build-tool/build-system/qt.rb', line 80
def reconfigure()
if File.exist?( "#{build_directory}/.qmake.cache" )
return false if self.class.execute( "rm -f #{build_directory}/.qmake.cache" ) != 0
end
configure
end
|