-
Notifications
You must be signed in to change notification settings - Fork 1
Project Layout
There are a few core design goals that LittleEngine strives to stick to / achieve, which result in most of the structural decisions around the project.
-
Portable: should not require any special paths to run (CMake
installstage updatesRPATHs) - Flexible: should not require to be run from any specific working directory (the application attempts to figure out its own working directory at runtime)
- Standalone: should have minimum external dependencies (static libs / app bundles where possible)
- Self-contained: all executable dependencies must be located in the same directory as itself (or its subdirectories)
- GUI friendly: should launch when interacted with from the OS explorer / finder / etc, and should embed icon and version info (each OS has its own implementation)
- Monolithic: releases should contain all necessary files and a single installer for all supported platforms
Development
-
Platform-independent: should be possible to build on all possible platforms (of course, limited by
ThirdPartycompatibility) - Tools-independent: should not enforce any specific IDE / toolchain / compiler (except on MacOSX)
-
Fast: builds should be as fast as possible (hence the recommendation to use
ninja; the use of forward declarations; preference towards large number of small code files; etc) -
Develop Configuration: should use
Releaselibs but be unoptimised and have all debugging features, including filesystem assets - Cross-platform tools: all tools scripts should be in Bash / Python for maximum compatibility
LittleEngine follows a relatively strict directory structure, intended to ease continuous development and contribution. In general, in-source builds are not permitted, and CMake scripts will attempt to detect and prevent such configurations from succeeding as well. All unsuccessful CMake configurations leave behind some build artefacts (CMakeCache.txt and CMakeFiles/), which must be manually cleaned up.
Directory structure:
LittleEngine/
.travis/
.CMake/
ThirdParty/
Include/ # All library headers
physfs/
[SFML/] # Downloaded during ThirdParty configuration (ignored)
CMakeLists.txt # Top level for ThirdParty
Core/
Engine/
Test/ # Test executable project
ThirdParty/ # Third party libraries source root
Tools/ # Misc tools scripts
CMakeLists.txt # Top level for LittleEngine
[out/*] # CMake build directories (ignored)
A short description of each sub-project / target of LittleEngine:
| Project | Description |
|---|---|
| ThirdParty | All dependencies that are built from source, like PhysicsFS and SFML. |
| Core | Core structures and utilities used by all projects. (Core contains a few submodules.) |
| LittleEngine | All Engine code: Context, Audio, Input, Physics, Renderer, Repository, etc. |
Config | MSVCRT | Libraries | DEBUGGING | SHIPPING | Optimisation | Disk Assets -------|--------|-----------|----------|--------------|-------------- Debug | CRTd | Debug | True | False | Od/O0 | True Release | CRT | Release | False | True | O2 | False