From 298ad937c0f068a83ebbf89fc8b0ef508d3cd01e Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 8 Jun 2022 01:10:12 +0200 Subject: [PATCH] cmake: wrap SDL_STATIC_PIC in double quotes (aka never trust user input) Suggested by @Wohlstand --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 294575e96..417896642 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3001,7 +3001,7 @@ if(SDL_STATIC) else() set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2") 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. 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")