Skip to content

zie87/sdl2_cxx

Repository files navigation

sdl2_cxx

Header only modern c++ wrapper for sdl2 and extensions

Build status Systems / Compilers
CLang / GCC / XCode Builds Linux (clang5 / gcc7) OSX (XCode 8.3 clang)
Visual Studio Builds Windows (Visual Studio 2017)

libraries used

  • SDL2 as base for this project.
  • catch as the test framework. (as submodule)

project structure

folder Content
/src sources of examples and tests
/inc library includes
/doc doxygen documentation (planned)
/3rd third party software

Generate project

  cmake -H. -BBuild

Auto detect everything.

If you like to set a implicit compiler set the variable CXX=${COMPILER}, for example COMPILER could be gcc, clang and so on.

Auto detect in Windows usually generate a Visual Studio project since msbuild require it, but in OSX does not generate and XCode project, since is not required for compiling using XCode clang.

Specify build type debug/release

  # generate a debug project
  cmake -H. -BBuild -DCMAKE_BUILD_TYPE=Debug
  # generate a release project
  cmake -H. -BBuild -DCMAKE_BUILD_TYPE=Release

Build

From the Build folder

  # build the default build type (in multi build types usually debug)
  cmake --build .
  # build a specific build type
  cmake --build . --config Release

Run tests

From the Build folder

  # run all test using the default build type
  ctest -V
  # run all test in Release build type
  ctest -V -C Release