📋
component-sdl2
  • Welcome
  • Setup
  • Getting started with the library
    • Getting started
    • Work with class identifiers
  • Extended work with the library
    • Creating custom components based on the Component class
    • Window event tracking
  • API
    • Supported CSS styles
    • Supported CSS Pseudo-Classes
    • Possible component events to track
    • Possible window events to track
Powered by GitBook
On this page
  • Setting boost (For GCC)
  • Setting SDL2 & SDL2_image & SDL2_ttf & SDL_gfx
  • Preparation

Was this helpful?

Setup

Setting boost (For GCC)

To support work with font search, std::filesystem is used, which is implemented in sufficient form inVisual C++, but not in GCC 8.2, so boost::filesystem is used to support filesystem!

# download boost (https://www.boost.org) and go to the folder 
# with boost and run the next command

./b2

# The compilation of boost is quite long, so be patient.

Setting SDL2 & SDL2_image & SDL2_ttf & SDL_gfx

# On Linux
sudo apt install build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-gfx-dev

# On Window
# Download from 
# 1. https://www.libsdl.org/
# 2. https://www.libsdl.org/tmp/SDL_ttf/
# 3. https://www.libsdl.org/tmp/SDL_image/
# 4. http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/

# and unzip folders to your convenience.

# note: SDL2_gfx must be manually assembled.

Preparation

git clone https://github.com/i582/component-sdl2.git
cd component-sdl2
git clone https://github.com/aminosbh/sdl2-cmake-modules
mv sdl2-cmake-modules cmake
cd test
git clone https://github.com/google/googletest

# for Window
# In CMakeLists.txt, write the paths to the folders with SDL2.

cd ../
mkdir build
cd build
cmake ..
cmake ..
cmake ..
cmake ..
cmake build .
PreviousWelcomeNextGetting started

Last updated 5 years ago

Was this helpful?