SDL: cmake: disallow '#include "SDL.h"'

From e10207e83152fe07b86123e730e7be02da178134 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Wed, 22 May 2024 19:18:00 +0200
Subject: [PATCH] cmake: disallow '#include "SDL.h"'

---
 CMakeLists.txt               | 2 --
 cmake/test/CMakeLists.txt    | 2 --
 cmake/test/inc_sdl_noslash.c | 8 --------
 3 files changed, 12 deletions(-)
 delete mode 100644 cmake/test/inc_sdl_noslash.c

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 077b3ad2cb82e..d87d152a36e27 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3218,7 +3218,6 @@ target_include_directories(SDL3_Headers
   INTERFACE
     "$<BUILD_INTERFACE:${SDL3_BINARY_DIR}/include>"
     "$<BUILD_INTERFACE:${SDL3_SOURCE_DIR}/include>"
-    "$<BUILD_INTERFACE:${SDL3_SOURCE_DIR}/include/SDL3>"
 )
 if(SDL_FRAMEWORK)
   target_include_directories(SDL3_Headers
@@ -3234,7 +3233,6 @@ else()
   target_include_directories(SDL3_Headers
     INTERFACE
       "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
-      "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL3>"
   )
 endif()
 
diff --git a/cmake/test/CMakeLists.txt b/cmake/test/CMakeLists.txt
index d3fd8a09ad805..9177bdc49c637 100644
--- a/cmake/test/CMakeLists.txt
+++ b/cmake/test/CMakeLists.txt
@@ -41,8 +41,6 @@ add_feature_info("TEST_FULL" TEST_FULL "Build full SDL testsuite")
 find_package(SDL3 REQUIRED CONFIG COMPONENTS Headers)
 add_library(headers_test_slash OBJECT inc_sdl_slash.c)
 target_link_libraries(headers_test_slash PRIVATE SDL3::Headers)
-add_library(headers_test_noslash OBJECT inc_sdl_noslash.c)
-target_link_libraries(headers_test_noslash PRIVATE SDL3::Headers)
 
 if(TEST_SHARED)
     find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3-shared)
diff --git a/cmake/test/inc_sdl_noslash.c b/cmake/test/inc_sdl_noslash.c
deleted file mode 100644
index 600329cabfbc5..0000000000000
--- a/cmake/test/inc_sdl_noslash.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "SDL.h"
-#include "SDL_main.h"
-
-void inc_sdl_noslash(void) {
-    SDL_SetMainReady();
-    SDL_Init(0);
-    SDL_Quit();
-}