[in-development] A python-based project build tool designed to simplify cross-platform builds and dependencies
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
commands
compilers
docs
drivers
hosts
targets
.gitignore
LICENSE
__init__.py
build.py
config.json
constants.py
core.py
models.py
platforms.py
readme.md
requirements
util.py

readme.md

pegasus

This code is authorized for use under the BSD 2-clause license.

--

Overview

The build tool is split into a few logical components.

Target Platforms

This contains specific details for the platform being built on. Linux, Mac OS X and Windows are supported with the ability to add more as needed.

Host Platforms

This is the platform the build system is being executed on. It doesn't necessarily correspond to the Target Platform. This contains common conventions specific to a platform in order for this build system to function properly; like creating paths correctly.

Drivers

Drivers are a special type of Command. These are ultimately what will do any raw building of source files. There is out-of-the-box support for msbuild, xcodebuild, and GNU make. Again, this is extensible.

Commands

Commands are classes that wrap a generic command-line utility. There are several built-in commands for file processing as well as CMake and Premake. As with platforms, you can create new commands as needed.

Actions

Actions describe different functions that can be run on a build script. The current list of supported actions include:

  • generate: Generates project files
  • build: build product(s)
  • clean: remove intermediate and output files
  • distclean: removes all generated files and folders

Actions may run recursively for all products and dependencies. You can limit this to run on the active product - see options.

Options

Example

	from pegasus.models import ProductType, Product

	def arguments(parser):
		parser.add_argument("--with-zlib", help="Compile with zlib", action="store_true", dest="with_zlib", default=False)


	def products(arguments, target_platform):
		test = Product(name="test", output=ProductType.StaticLibrary)
		test.sources = [
			"src/**.cpp",
			"src/**.h"
		]

		test.includes = [
			"src"
		]

		return [test]