cmake: wrap SDL_STATIC_PIC in double quotes (aka never trust user input)

Suggested by @Wohlstand
This commit is contained in:
Anonymous Maarten 2022-06-08 01:10:12 +02:00 committed by Sam Lantinga
parent ad272ac690
commit 298ad937c0
1 changed files with 1 additions and 1 deletions

View File

@ -3001,7 +3001,7 @@ if(SDL_STATIC)
else() else()
set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2") set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
endif() endif()
set_target_properties(SDL2-static PROPERTIES POSITION_INDEPENDENT_CODE ${SDL_STATIC_PIC}) set_target_properties(SDL2-static PROPERTIES POSITION_INDEPENDENT_CODE "${SDL_STATIC_PIC}")
# Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB. # Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB.
if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM") if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB") set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")