Menu

Project structure

benblan

[Project Guidelines and Rules]

Project structure

File structure

Here is a description of the project in terms of directories and files :

freesynd/
  -cmake/     <-- Cmake libraries
  -data/      <-- contains freesynd files for configuration including a reference freesynd.ini file
  -docs/      <-- contains the man file for linux and Doxygen config using cmake
  -editor/    <-- source code for the editor
  -engine/    <-- source code for the engine library (gfx, menus, sound and 2D framework encapsulation)
  -extern/    <-- external library for compiling the project (currently SDL lib for windows)
  -game/      <-- source code for the main freesynd application
  -icon/      <-- the icons for the package application
  -kernel/    <-- source code for the kernel lib (common code for game objects)
  -packaging/ <-- resources for specific packaging formats (mainly DEB format)
  -utils/     <-- source code for utility functions

Plus, there are 2 directories that are defined in the .gitignore file :
- build : to store the compiled objects for the different configurations
- inst : for local installations

CMake organization

CMake is used to configure the build of the application. We follow the principle of Modern CMake .
The application is composed of several components. By default, all libraries are compiled and linked statically with the applications.

fs_utils (alias Freesynd::Utils)

This library contains all utility code for the rest of the application.

fs_engine (alias Freesynd::Engine)

Defines some kind of framework for Freesynd.
Depends on : Freesynd::Utils, PNG::PNG

fs_engine_sdl (alias Freesynd::Engine::Sdl)

This is a sub library used to define an encapsulation of SDL library.
Only defined if the cmake USE_SYSTEM_SDL variable is defined.
Depends on : SDL::SDL ${SDLIMAGE_LIBRARY} Freesynd::Utils

fs_engine_sdlmixer (alias Freesynd::Engine::SdlMixer)

This is a sub library used to define an encapsulation of SDL Mixer library.
Only defined if the cmake USE_SDL_MIXER variable is defined.
Depends on : Freesynd::Utils SDL::SDL ${SDL_MIXER_LIBRARIES}

fs_kernel (alias Freesynd::Kernel)

A library that contains all common code for the game (game objects and logic that is common for the game and editor).
Depends on: Freesynd::Utils Freesynd::Engine

freesynd

This is the executable that defines the Freesynd application.
Depends on: Freesynd::Utils Freesynd::Engine Freesynd::Kernel

fs-editor

This is the executable that defines the Freesynd editor.
Depends on: Freesynd::Utils Freesynd::Engine Freesynd::Kernel

Special librairies

freesynd_warnings

This library (in terms of CMake) is only used to attach compiler warnings (see CompilerWarnings.cmake) so it can be used for each library/executable as a dependency.


Related

Wiki: Project Guidelines and Rules

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.