lenhatquang2512 / sdl2_music_project

This is SDL2.0 app project built with CMake

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PDL 2.0 Sample demo with CMake built in Ubuntu 20.04

General description

  • Built a cross-platform app that can be run on any kind of OS (MacOS, Linux, Windows, etc...)
  • Use as a template for any project that utitlise SDL2.0

Requirement packages

  • g++ in Linux Ubuntu

sudo apt-get install g++

sudo apt-get install libsdl2-dev

  • CMake (used to compile the entire file if using CMakeLists)

sudo apt-get install cmake

  • SDL2 add-ons libraries (OPTIONAL, only installed if you want to work with those extended libraries)

sudo apt install libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev libsdl2-gfx-dev

Usage

  • Please run in order:
mkdir build

cd build

cmake ..

make -j4

./sdl_demo

Notes

To run this project in VSCode with CMake extension enabled, you should configure CMake to use 'UNIX Makefiles' for generator by configuring in USER settings.json:

"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",

"cmake.generator": "Unix Makefiles",

Hit F7 to build and F5 to run.

Please give us a Star if you find this helpful !

About

This is SDL2.0 app project built with CMake

License:GNU General Public License v2.0


Languages

Language:CMake 63.9%Language:C++ 36.0%Language:Shell 0.1%