diff --git a/CMakeLists.txt b/CMakeLists.txt index 06712aeed6..8166c49663 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -466,9 +466,9 @@ sdl_include_directories( ) # Note: The clang toolset for Visual Studio does not support the '-idirafter' option. if(USE_GCC OR USE_INTELCC OR (USE_CLANG AND NOT MSVC_CLANG)) - sdl_compile_options(NO_EXPORT PUBLIC "$") + sdl_compile_options(NO_EXPORT PRIVATE "$") else() - sdl_include_directories(NO_EXPORT SYSTEM PUBLIC "$") + sdl_include_directories(NO_EXPORT SYSTEM PRIVATE "$") endif() # General source files diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ae6f5b342f..b823af8596 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -131,6 +131,7 @@ macro(add_sdl_test_executable TARGET) add_executable(${TARGET} ${AST_SOURCES} ${EXTRA_SOURCES}) endif() SDL_AddCommonCompilerFlags(${TARGET}) + target_include_directories(${TARGET} PRIVATE "${SDL3_SOURCE_DIR}/src/video/khronos") target_link_libraries(${TARGET} PRIVATE SDL3::SDL3_test SDL3::${sdl_name_component}) if(NOT AST_NO_C90 AND NOT SDL_CMAKE_PLATFORM MATCHES "^(n3ds|ps2|psp)$") set_property(TARGET ${TARGET} PROPERTY C_STANDARD 90)