SDL: cmake: Add SDL include path when building tests

From 16845eef2944c90db8b60d7f24be8f6c7c43e2be Mon Sep 17 00:00:00 2001
From: Cameron Gutman <[EMAIL REDACTED]>
Date: Sat, 30 Oct 2021 12:06:58 -0500
Subject: [PATCH] cmake: Add SDL include path when building tests

The tests can't find any of the SDL includes otherwise
---
 CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f5b6c0ab0..edb926fe01 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2738,6 +2738,8 @@ endif()
 ##### Tests #####
 
 if(SDL_TEST)
+  include_directories(BEFORE "${SDL2_BINARY_DIR}/include")
+  include_directories(AFTER "${SDL2_SOURCE_DIR}/include")
   file(GLOB TEST_SOURCES ${SDL2_SOURCE_DIR}/src/test/*.c)
   add_library(SDL2_test STATIC ${TEST_SOURCES})
   add_subdirectory(test)