test: Add a make install target for the tests

This makes it more convenient to compile them alongside SDL, install
them in an optional package and use them as smoke-tests or diagnostic
tools. The default installation directory is taken from GNOME's
installed-tests, which seems as good a convention as any other:
https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2020-11-25 13:30:29 +00:00
committed by Sam Lantinga
parent 76a7b629bf
commit 38ef678990
4 changed files with 112 additions and 0 deletions

View File

@@ -472,6 +472,7 @@ set(SDL_STATIC ${SDL_STATIC_ENABLED_BY_DEFAULT} CACHE BOOL "Build a static versi
dep_option(SDL_STATIC_PIC "Static version of the library should be built with Position Independent Code" OFF "SDL_STATIC" OFF)
set_option(SDL_TEST "Build the test directory" OFF)
set_option(SDL_INSTALL_TESTS "Install test-cases" OFF)
if(VITA)
set_option(VIDEO_VITA_PIB "Build with PSVita piglet gles2 support" OFF)