build = join(build, 'release') if 0: if exists(build): print 'Removing build dir...' util.rmtree(build) os.makedirs(build) config = package[standard.a_configuration].title() options = [ ('CEGUI_BUILD_TYPE', config), ('CEGUI_BUILD_XMLPARSER_TINYXML', '1'), ('CMAKE_INCLUDE_PATH', '%INCLUDE%'), ('CMAKE_LIBRARY_PATH', '%LIB%') ] options = ' '.join('-D %s=%s' % (k, v) for k, v in options) util.run('cmake -G"NMake Makefiles" %s ..' % options, cwd=build) util.run('nmake', cwd=build) environment.define_paths(recipe, { environment.headers: [ 'cegui\\include', 'cegui\\include\\cegui', 'build\\debug\\cegui\\include', ], environment.libraries: ['build\\debug\\lib'], environment.executables: ['build\\debug\\bin'] })
from os.path import join import project import package import environment import system from attributes import a_location recipe = project.Project('openal', "OpenAL") path = r'C:\Program Files (x86)\OpenAL 1.1 SDK' @system.scan.implement(recipe) def scan(project): return [ package.Package(project, { a_location: path }) ] environment.define_paths(recipe, { environment.libraries: ['libs\\Win32'], environment.headers: ['include'], environment.executables: ['bin'] })
from os.path import join import environment import standard import simple import util url = "http://downloads.sourceforge.net/project/" "tinyxml/tinyxml/2.6.2/tinyxml_2_6_2.zip" @simple.source("tinyxml", "TinyXML", url) def recipe(package): cwd = package[standard.a_location] modules = "tinyxml tinystr tinyxmlparser tinyxmlerror".split() files = lambda ext: " ".join(".".join((m, ext)) for m in modules) util.run("cl /Zi /nologo /c %s /MD" % files("cpp"), cwd=cwd) util.run("lib /nologo %s" % files("obj"), cwd=cwd) environment.define_paths(recipe, {environment.headers: ".", environment.libraries: "."})
from os.path import join import subprocess import simple import environment import standard url = "http://downloads.sourceforge.net/project/" \ "boost/boost/1.51.0/boost_1_51_0.tar.bz2" @simple.source('boost', "Boost C++ Libraries", url, prefix='./boost_1_51_0') def recipe(package): cwd = package[standard.a_location] ret = subprocess.call( '"%s"' % join(cwd, 'bootstrap.bat'), cwd=cwd, shell=True) if ret: raise Exception ret = subprocess.call( '"%s" --with-filesystem --with-thread --with-signals --with-program_options' % join(cwd, 'b2'), cwd=cwd, shell=True) if ret: raise Exception environment.define_paths(recipe, [ (environment.headers, ['']), (environment.libraries, [join('stage', 'lib')]) ])