/sdl2_cmake_setup

Install SDL2 on Windows so CMake finds it

Primary LanguageInno Setup

SDL2 Setup

screenshot

Download: SDL2_Setup.exe

Installs SDL2 on Windows (MSVC, 32/64bit), making this work out of the box:

find_package(SDL2 REQUIRED)

Setup steps

Internally, the setup does the following:

  1. Downloads SDL2 development libraries (For MS Visual C++, 32/64bit) from libsdl.org

  2. Extracts them to your directory of choice

  3. Adds a CMake config file to them

  4. Sets the SDL2_DIR environment variable in the registry to the correct path

  5. Moves the headers in include/ to include/SDL2/ to fix include paths (for #include <SDL2/SDL.h>)

  6. Informs IDEs about a change in the system environment, as to not require a reboot

  7. Creates an uninstaller and registers it with Windows