mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-27 10:57:22 +08:00
cmake: add khronos include directories with PRIVATE visibility
This commit is contained in:
committed by
Anonymous Maarten
parent
7bcbc48c61
commit
9aff68746f
+2
-2
@@ -466,9 +466,9 @@ sdl_include_directories(
|
|||||||
)
|
)
|
||||||
# Note: The clang toolset for Visual Studio does not support the '-idirafter' option.
|
# 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))
|
if(USE_GCC OR USE_INTELCC OR (USE_CLANG AND NOT MSVC_CLANG))
|
||||||
sdl_compile_options(NO_EXPORT PUBLIC "$<BUILD_INTERFACE:-idirafter${SDL3_SOURCE_DIR}/src/video/khronos>")
|
sdl_compile_options(NO_EXPORT PRIVATE "$<BUILD_INTERFACE:-idirafter${SDL3_SOURCE_DIR}/src/video/khronos>")
|
||||||
else()
|
else()
|
||||||
sdl_include_directories(NO_EXPORT SYSTEM PUBLIC "$<BUILD_INTERFACE:${SDL3_SOURCE_DIR}/src/video/khronos>")
|
sdl_include_directories(NO_EXPORT SYSTEM PRIVATE "$<BUILD_INTERFACE:${SDL3_SOURCE_DIR}/src/video/khronos>")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# General source files
|
# General source files
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ macro(add_sdl_test_executable TARGET)
|
|||||||
add_executable(${TARGET} ${AST_SOURCES} ${EXTRA_SOURCES})
|
add_executable(${TARGET} ${AST_SOURCES} ${EXTRA_SOURCES})
|
||||||
endif()
|
endif()
|
||||||
SDL_AddCommonCompilerFlags(${TARGET})
|
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})
|
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)$")
|
if(NOT AST_NO_C90 AND NOT SDL_CMAKE_PLATFORM MATCHES "^(n3ds|ps2|psp)$")
|
||||||
set_property(TARGET ${TARGET} PROPERTY C_STANDARD 90)
|
set_property(TARGET ${TARGET} PROPERTY C_STANDARD 90)
|
||||||
|
|||||||
Reference in New Issue
Block a user