CsPaint  1.0.1
Building on Windows (MinGW)

You will need to install the following two libraries.

  • SDL2
  • Vulkan SDK

After you extract the SDL2 zip file you will need to modify on of their distributed files called sdl2-config.cmake. Lines 1, 4, and 5 should be adjusted as shown.

set(prefix ${sdl2_DIR}/../../..)
set(exec_prefix "${prefix}")
set(libdir "${exec_prefix}/lib")
set(SDL2_PREFIX ${sdl2_DIR}/../../..)
set(SDL2_EXEC_PREFIX ${sdl2_DIR}/../../..)
set(SDL2_LIBDIR "${exec_prefix}/lib")
set(SDL2_INCLUDE_DIRS "${prefix}/include/SDL2")
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} -lmingw32 -lSDL2main -lSDL2 -mwindows")
string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)

Building

The following bash script will configure CMake for building CsPaint using MinGW. You will need to adjust the value for SDL2_DIR depending on where you installed it. The exact version of the Vulkan SDK export needs to match the one installed on your computer.

export SDL2_DIR=/c/SDL/x86_64-w64-mingw32/lib/cmake/SDL2
export VULKAN_SDK=/c/VulkanSDK/1.1.114.0
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/c/cs_paint_lib /c/cs_paint

To build CsPaint and the Graphics Demo run the following command from a bash prompt.

ninja