CI: Add Windows build with mingw toolchain
Recent Commits to cava:master
-
CI: Add Windows build with mingw toolchain
-
Fix Ctrl-c handler function for Windows
Fix Ctrl-c handler function for Windows This fixes the following compiler error with mingw compiler. cava/cava.c:258:32: error: passing argument 1 of 'SetConsoleCtrlHandler' from incompatible pointer type [-Wincompatible-pointer-types] 258 | if (!SetConsoleCtrlHandler(sig_handler, TRUE)) { | ^~~~~~~~~~~ | | | void (*)(int) -
Use proper printf function with stderr
Use proper printf function with stderr This fixes the following compiler error with mingw compiler. cava/output/sdl_glsl.c:89:16: error: passing argument 1 of 'printf' from incompatible pointer type [-Wincompatible-pointer-types] 89 | printf(stderr, "Error initializing GLEW! %s\n", glewGetErrorString(glewError)); | ^~~~~~ | | | FILE * {aka struct _iobuf *} -
Fix relative include directory for header files
Fix relative include directory for header files This fixes compiler errors as following with cmake and mingw compiler. cava/output/sdl_glsl.c:9:10: fatal error: output/sdl_glsl.h: No such file or directory 9 | #include "output/sdl_glsl.h" | ^~~~~~~~~~~~~~~~~~~ compilation terminated.
-
Fix preprocessor for checking Windows
Fix preprocessor for checking Windows _MSC_VER is defined in MSVC toolchain only whereas _WIN32 is defined for all toolchain targeting Windows. See https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros
-
CMake: Add condition for targeting Windows
CMake: Add condition for targeting Windows