Fix enabling tests on platforms without testnative support
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index e81ead7..0d545a2 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -105,7 +105,7 @@ if(APPLE)
testutils.c)
elseif(WINDOWS)
add_executable(testnative testnative.c testnativew32.c testutils.c)
-elseif(UNIX)
+elseif(SDL_X11)
add_executable(testnative testnative.c testnativex11.c testutils.c)
target_link_libraries(testnative X11)
endif()
@@ -180,7 +180,6 @@ SET(ALL_TESTS
testmessage
testmouse
testmultiaudio
- testnative
testoffscreen
testoverlay2
testplatform
@@ -225,6 +224,10 @@ set(NONINTERACTIVE
testver
)
+if(WINDOWS OR APPLE OR SDL_X11)
+ list(APPEND ALL_TESTS testnative)
+endif()
+
if(LINUX)
list(APPEND ALL_TESTS testevdev)
list(APPEND NONINTERACTIVE testevdev)
@@ -292,12 +295,14 @@ else()
testaudiohotplug
testmultiaudio
testime
- testnative
testiconv
testoverlay2
teststreaming
testviewport
)
+ if(WINDOWS OR APPLE OR SDL_X11)
+ list(APPEND NEEDS_RESOURCES testnative)
+ endif()
endif()
if(PSP)