From 8c2c4f457f2de4ac005b83b29fd73d5759f62bc4 Mon Sep 17 00:00:00 2001 From: "Amine B. Hassouna" Date: Tue, 20 Nov 2018 18:36:42 +0100 Subject: [PATCH] Add SDL2_gfx library --- CMakeLists.txt | 6 +++--- README.md | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5aada1..8a8a233 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/README.md b/README.md index c2174dd..d20d756 100644 --- a/README.md +++ b/README.md @@ -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