We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4117

Summary: SDL_CMAKE_DEBUG_POSTFIX can not take an empty string
Product: SDL Reporter: Yuriy Levchenko <irov13>
Component: buildAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: tesch1
Version: 2.0.10Keywords: target-2.0.12
Hardware: x86_64   
OS: Windows 7   

Description Yuriy Levchenko 2018-03-25 18:12:00 UTC
If I set this option to "", then I get an error in this code

set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})

add a check that this variable exists, like this

if(SDL_CMAKE_DEBUG_POSTFIX)
  set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
endif()

Thanks!
Comment 1 Michael Tesch 2019-11-15 09:16:04 UTC
I've also just stumbled upon this bug.

Another possible fix would be to just add quotes around the variable expansion:

set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")

This occurs on lines 1795, 1825, 1865 of CMakeLists.txt
Comment 2 Ryan C. Gordon 2019-12-03 07:43:17 UTC
This is fixed in https://hg.libsdl.org/SDL/rev/8cd53e2d31a5, thanks!

--ryan.