Giter Site home page Giter Site logo

c-cmake-sdl2-boilerplate's Introduction

C, Cmake and SDL2 Boilerplate CI

This is a C project template with the following features:

Usage

Setup

This will build cmake files and download dependencies

make setup

Build

# Debug build
make debug
# Release build
make release

Run Tests

This will build and run unity tests

make test

Code Coverage Checks

This will build and run unity tests and generate reports for coverage (depends on lcov)

make coverage
# This part is optional: Generates a html with more coverage details
genhtml build/coverage/coverage.info --output-directory build/coverage/out

Clean

This will delete generated files for debug and release

make clean

Run Binary

This will open an SDL black window with the unlicense logo on it for 3 seconds.

# Debug bin
./build/debug/bin/example_app
# Release bin
./build/release/bin/example_app

Directory Structure

./
├── .github
│   └── workflows -- Github workflows folder.
├── app -- Application source code
├── build
│   ├── cmake -- Cmake Finders for external compiled libs.
│   ├── debug -- Cmake debug build generated files.
│   │   ├── bin -- Application debug binaries.
│   │   └── resources -- Application resources assets symbolic link.
│   └── release -- Cmake release build generated files.
│       ├── bin -- Application release binaries.
│       └── resources -- Application resources assets symbolic link.
├── resources -- Application resources assets folder.
├── src -- Library source code and headers.
└── test -- Test source code.
    └── unity -- Unity test framework source.

Dependencies

Installing Dependencies

Arch Linux

yay -Sy clang cmake lcov sdl2 sdl2_image

Ubuntu

sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
sudo apt-get update -y -qq
sudo apt-get install clang cmake lcov libsdl2-dev libsdl2-image-dev

Showcase

Projects using this boilerplate:

License

This is free and unencumbered software released into the public domain.
For more information, please refer to http://unlicense.org/

c-cmake-sdl2-boilerplate's People

Contributors

rafaeldelboni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.