Add SDL2_gfx library

This commit is contained in:
Amine B. Hassouna
2018-11-20 18:36:42 +01:00
parent 0a4150917b
commit 8c2c4f457f
2 changed files with 7 additions and 7 deletions

View File

@@ -58,7 +58,7 @@ target_link_libraries(${PROJECT_NAME} ${SDL2_LIBRARIES})
#target_link_libraries(${PROJECT_NAME} ${SDL2TTF_LIBRARIES})
# Add SDL2_gfx library
#pkg_search_module(SDL2GFX REQUIRED SDL2_gfx)
#include_directories(${SDL2GFX_INCLUDE_DIRS})
#target_link_libraries(${PROJECT_NAME} ${SDL2GFX_LIBRARIES})
pkg_search_module(SDL2GFX REQUIRED SDL2_gfx)
include_directories(${SDL2GFX_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${SDL2GFX_LIBRARIES})

View File

@@ -9,21 +9,21 @@ It shows how we can develop a basic grid-based game.
- C Compiler (gcc, ...)
- [CMake][]
- [SDL2][SDL] library
- [SDL2_gfx][] library
**On Debian/Ubuntu based distributions, use the following command:**
```sh
sudo apt install git-core build-essential pkg-config cmake cmake-data libsdl2-dev
sudo apt install git-core build-essential pkg-config cmake cmake-data libsdl2-dev libsdl2-gfx-dev
```
**Optional packages:**
- [SDL2_image][] library
- [SDL2_ttf][] 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
```
## Build instructions
@@ -45,7 +45,7 @@ make
./basic-c-sdl-game
```
***Note:*** To use SDL2_image, SDL2_ttf or SDL2_gfx, you should uncomment
***Note:*** To use SDL2_image or SDL2_ttf, you should uncomment
some instructions in the CMakeLists.txt file and re-execute `cmake ..` and `make`
### Open the project with an IDE under Linux