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 - SDL_CMAKE_DEBUG_POSTFIX can not take an empty string
Summary: SDL_CMAKE_DEBUG_POSTFIX can not take an empty string
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: 2.0.10
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.12
Depends on:
Blocks:
 
Reported: 2018-03-25 18:12 UTC by Yuriy Levchenko
Modified: 2019-12-03 07:43 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.