cmake: Add mini-SDL2 CMake project to test SDL2 prefixes

This commit is contained in:
Anonymous Maarten
2022-06-03 20:07:43 +02:00
committed by Sam Lantinga
parent 67792767f5
commit 9ff8f29f43
3 changed files with 133 additions and 0 deletions

14
cmake/test/main_cli.c Normal file
View File

@@ -0,0 +1,14 @@
#define SDL_MAIN_HANDLED
#include "SDL.h"
#include <stdio.h>
int main(int argc, char *argv[]) {
SDL_SetMainReady();
if (SDL_Init(0) < 0) {
fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
return 1;
}
SDL_Delay(100);
SDL_Quit();
return 0;
}