Modernize CMakeList.txt
This commit is contained in:
17
README.md
17
README.md
@@ -1,6 +1,6 @@
|
||||
# Basic C SDL project
|
||||
# Basic C SDL2 project
|
||||
|
||||
This project is a basic C [SDL][] project that uses [CMake][] as a build system.
|
||||
This project is a basic C [SDL2][SDL] project that uses [CMake][] as a build system.
|
||||
|
||||
## Dependencies
|
||||
|
||||
@@ -19,17 +19,19 @@ sudo apt install git build-essential pkg-config cmake cmake-data libsdl2-dev
|
||||
|
||||
- [SDL2_image][] library
|
||||
- [SDL2_ttf][] library
|
||||
- [SDL2_net][] library
|
||||
- [SDL2_mixer][] library
|
||||
- [SDL2_gfx][] library
|
||||
|
||||
```sh
|
||||
sudo apt install libsdl2-image-dev libsdl2-ttf-dev libsdl2-gfx-dev
|
||||
sudo apt install libsdl2-image-dev libsdl2-ttf-dev libsdl2-net-dev libsdl2-mixer-dev libsdl2-gfx-dev
|
||||
```
|
||||
|
||||
## Build instructions
|
||||
|
||||
```sh
|
||||
# Clone this repo
|
||||
git clone https://gitlab.com/aminosbh/basic-c-sdl-project.git
|
||||
git clone --recurse-submodules https://gitlab.com/aminosbh/basic-c-sdl-project.git
|
||||
cd basic-c-sdl-project
|
||||
|
||||
# Create a build folder
|
||||
@@ -44,8 +46,9 @@ make
|
||||
./basic-c-sdl-project
|
||||
```
|
||||
|
||||
***Note:*** To use SDL2_image, SDL2_ttf or SDL2_gfx, you should uncomment
|
||||
some instructions in the CMakeLists.txt file and re-execute `cmake ..` and `make`
|
||||
***Note:*** To use SDL2_image, SDL2_ttf, SDL2_net, SDL2_mixer or SDL2_gfx, you
|
||||
should uncomment some instructions in the CMakeLists.txt file and re-execute
|
||||
the `make` command.
|
||||
|
||||
### Open the project with an IDE under Linux
|
||||
|
||||
@@ -65,4 +68,6 @@ This project is distributed under the terms of the MIT license
|
||||
[Git]: https://git-scm.com
|
||||
[SDL2_image]: https://www.libsdl.org/projects/SDL_image
|
||||
[SDL2_ttf]: https://www.libsdl.org/projects/SDL_ttf
|
||||
[SDL2_net]: https://www.libsdl.org/projects/SDL_net
|
||||
[SDL2_mixer]: https://www.libsdl.org/projects/SDL_mixer
|
||||
[SDL2_gfx]: http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx
|
||||
|
||||
Reference in New Issue
Block a user