Skip to content

Europasoft/EuropaBuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EuropaBuild

An uncomplicated C++ build system

Free yourself from the clunky and confusing syntax of other build system languages.
EuropaBuild is a meta-build system which makes building simple C++ programs and libraries easier than ever.
Build rules are set up in a simple JSON file, with a structure designed to be even easier to read and write than Meson.

All you need is

  • EuropaBuild itself
  • A build file: EuropaBuild.json
  • Ninja and a suitable compiler
  • Some code to build

Self-Compiling

EuropaBuild can build itself from source.
No need for another build tool, simply run the EuropaBuild executable in the root directory.
Check the pre-configured EuropaBuild.json to see how the self-build is set up.

C++ first

The build system itself is written in pure, modern C++.
Support for a wide arrray of languages is outside the scope of this project,
as such, it is mainly intended to build C++ and C code.
That being said, support for the Rust language would be nice.

Cross-platform

Building the same program for Windows and GNU/Linux should be effortless.
Cross-compilation (building code to run on another operating system) is currently not supported, but it would be a useful feature to have.

Examples

The root self-build file (EuropaBuild.json), which is used by the system to build itself, is a good example.
Here is an even simpler one:

[
	{
		"target": "HelloWorld",
		"type": "executable",
		"output path": "build/",
		"sources":
		[
			"HelloWorldSource/"
		],
		"include paths":
		[
		],
		"dependencies":
		[
		]
	}
]

This example specifies one target; an application called HelloWorld which has no dependencies. Imagine there is a folder called HelloWorldSource and two files with C++ code:

HelloWorldSource/HelloWorld.cpp
HelloWorldSource/HelloWorld.hpp

EuropaBuild recursively finds all source files from each directory in the "sources" array; each target's code must exists in its own distinct directory (or directories).

More targets can be added to the JSON array to configure more complicated projects

Target types

  • "executable" - A linked program (.exe)
  • "static library" - A static library (.lib or .a)
  • "dynamic library" - A dynamic library (.DLL)
  • "dependency" - A dependency is linked directly into another target, this is basically the same as specifying more sources into the other target, but could be useful to separate parts or subprojects from each other.

"dependencies"

Dependencies are compiled before the targets(s) which depend on them,
and are linked against against them once the final target has been compiled.

Why Ninja?

Ninja is a very useful tool with an emphasis on speed.
It is also written primarily in C++, which makes it suitable for a C++-first ecosystem.
Ninja is not a meta-build system, its intended use case is exactly this; i.e. to execute build rules generated by another tool (such as EuropaBuild).
The goal of this project is to simplify and automate builds, not to reinvent the wheel, which is why Ninja is required.

Current status

The project is currently in an early alpha stage;
it is capable of compiling and linking programs, but there may be serious design flaws yet to be addressed.
All features and code structure are subject to change.

Being intentionally simplified, unsupported configurations are bound to exist.
Please submit any feature requests in Discussions.

Thanks

Big thanks to Dylan Baker from Intel Corporation (no affiliation with Europa Software Ltd),
for making Meson++ open-source. This project started as a fork of Meson++
which provided the initial inspiration and a good code foundation to build on.

About

An uncomplicated C++ build system. Free yourself from the clunky and confusing syntax of other build system languages.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 6

Languages