mangos-zero relies on CMake to produce build definitions and project files on various platforms, such as Linux, Windows or Mac OS X.
To ensure that our project can be built on most platforms we enforce a few
rules when crafting
These rules are preliminary and based on the experiences with our new unified CMake build definitions.
Rules may change. Make sure to check back.
Since we removed any platform specific build files, and just kept CMake build definitions, we have found a few rules which will greatly ease maintaining our build system, and ensuring it works on all platforms.
As with all things, there is a certain order to CMake definitions that ensures thins will run smooth.
CMake modules required come first
Any sub directories should follow.
Build switches a user can select.
Define the source¶
Source lists, includes, dependencies - based on build switches
Variables and files to be combined
Add library, executable - link dependencies, based on build switches
Set up compile time flags - based on build switches
Install built app/library, configured files, and others - based on build switches