cmake: ${SDL_CMAKE_DEBUG_POSTFIX} needs to be wrapped in quotes.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 03 Dec 2019 02:42:53 -0500
changeset 133058cd53e2d31a5
parent 13304 b393fb36e61a
child 13306 c51961094960
cmake: ${SDL_CMAKE_DEBUG_POSTFIX} needs to be wrapped in quotes.

Otherwise, if it's an empty string, it causes problems.

Fixes Bugzilla #4117.
CMakeLists.txt
     1.1 --- a/CMakeLists.txt	Thu Nov 28 14:23:24 2019 -0800
     1.2 +++ b/CMakeLists.txt	Tue Dec 03 02:42:53 2019 -0500
     1.3 @@ -2013,7 +2013,7 @@
     1.4  target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
     1.5  set(_INSTALL_LIBS "SDL2main")
     1.6  if (NOT ANDROID)
     1.7 -  set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
     1.8 +  set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
     1.9  endif()
    1.10  
    1.11  if (ANDROID AND HAVE_HIDAPI)
    1.12 @@ -2047,7 +2047,7 @@
    1.13    target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
    1.14    target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
    1.15    if (NOT ANDROID)
    1.16 -    set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
    1.17 +    set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
    1.18    endif()
    1.19    if(IOS OR TVOS)
    1.20      set_property(TARGET SDL2 APPEND_STRING PROPERTY COMPILE_FLAGS "-fobjc-arc")
    1.21 @@ -2093,7 +2093,7 @@
    1.22    target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
    1.23    target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
    1.24    if (NOT ANDROID)
    1.25 -    set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
    1.26 +    set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
    1.27    endif()
    1.28    if(IOS OR TVOS)
    1.29      set_property(TARGET SDL2-static APPEND_STRING PROPERTY COMPILE_FLAGS "-fobjc-arc")