Add SDL2_gfx library
This commit is contained in:
@@ -58,7 +58,7 @@ target_link_libraries(${PROJECT_NAME} ${SDL2_LIBRARIES})
|
|||||||
#target_link_libraries(${PROJECT_NAME} ${SDL2TTF_LIBRARIES})
|
#target_link_libraries(${PROJECT_NAME} ${SDL2TTF_LIBRARIES})
|
||||||
|
|
||||||
# Add SDL2_gfx library
|
# Add SDL2_gfx library
|
||||||
#pkg_search_module(SDL2GFX REQUIRED SDL2_gfx)
|
pkg_search_module(SDL2GFX REQUIRED SDL2_gfx)
|
||||||
#include_directories(${SDL2GFX_INCLUDE_DIRS})
|
include_directories(${SDL2GFX_INCLUDE_DIRS})
|
||||||
#target_link_libraries(${PROJECT_NAME} ${SDL2GFX_LIBRARIES})
|
target_link_libraries(${PROJECT_NAME} ${SDL2GFX_LIBRARIES})
|
||||||
|
|
||||||
|
|||||||
@@ -9,21 +9,21 @@ It shows how we can develop a basic grid-based game.
|
|||||||
- C Compiler (gcc, ...)
|
- C Compiler (gcc, ...)
|
||||||
- [CMake][]
|
- [CMake][]
|
||||||
- [SDL2][SDL] library
|
- [SDL2][SDL] library
|
||||||
|
- [SDL2_gfx][] library
|
||||||
|
|
||||||
**On Debian/Ubuntu based distributions, use the following command:**
|
**On Debian/Ubuntu based distributions, use the following command:**
|
||||||
|
|
||||||
```sh
|
```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:**
|
**Optional packages:**
|
||||||
|
|
||||||
- [SDL2_image][] library
|
- [SDL2_image][] library
|
||||||
- [SDL2_ttf][] library
|
- [SDL2_ttf][] library
|
||||||
- [SDL2_gfx][] library
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt install libsdl2-image-dev libsdl2-ttf-dev libsdl2-gfx-dev
|
sudo apt install libsdl2-image-dev libsdl2-ttf-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build instructions
|
## Build instructions
|
||||||
@@ -45,7 +45,7 @@ make
|
|||||||
./basic-c-sdl-game
|
./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`
|
some instructions in the CMakeLists.txt file and re-execute `cmake ..` and `make`
|
||||||
|
|
||||||
### Open the project with an IDE under Linux
|
### Open the project with an IDE under Linux
|
||||||
|
|||||||
Reference in New Issue
Block a user