mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
Fix more SDL_main issues
- Always include SDL2/SDL_main.h in all tests to handle main() correctly - Link all tests with SDL2pp (and thus with libSDL2main)
This commit is contained in:
parent
0355e817fc
commit
7dd543053c
@ -29,6 +29,7 @@ FOREACH(HEADER ${LIBRARY_HEADERS})
|
||||
STRING(REGEX REPLACE [^a-zA-Z0-9] _ HEADER_NORMALIZED ${HEADER})
|
||||
CONFIGURE_FILE(header_test.cc.in ${HEADER_NORMALIZED}_test.cc)
|
||||
ADD_EXECUTABLE(${HEADER_NORMALIZED}_test ${HEADER_NORMALIZED}_test.cc)
|
||||
TARGET_LINK_LIBRARIES(${HEADER_NORMALIZED}_test SDL2pp)
|
||||
ENDFOREACH(HEADER ${TESTS})
|
||||
|
||||
FOREACH(TEST ${CLI_TESTS})
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <SDL2/SDL_main.h>
|
||||
#include <@HEADER@>
|
||||
|
||||
int main(int, char*[]) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <SDL2/SDL_main.h>
|
||||
#include <SDL2/SDL_error.h>
|
||||
|
||||
#include <SDL2pp/Exception.hh>
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include <string>
|
||||
|
||||
#include <SDL2/SDL_main.h>
|
||||
|
||||
#include <SDL2pp/Optional.hh>
|
||||
|
||||
#include "testing.h"
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include <SDL2/SDL_main.h>
|
||||
|
||||
#include <SDL2pp/Point.hh>
|
||||
#include <SDL2pp/Rect.hh>
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include <SDL2/SDL_main.h>
|
||||
|
||||
#include <SDL2pp/Point.hh>
|
||||
#include <SDL2pp/Rect.hh>
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <SDL2/SDL_main.h>
|
||||
|
||||
#include <SDL2pp/Exception.hh>
|
||||
#include <SDL2pp/ContainerRWops.hh>
|
||||
#include <SDL2pp/StreamRWops.hh>
|
||||
|
Loading…
x
Reference in New Issue
Block a user