You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whitespace at end of SDL2_LIBRARIES causes CMake errors like below:
CMake Error at CMakeLists.txt:8 (add_library):
Target "mylib" links to item "-L/usr/lib64 -lSDL2 " which has leading
or trailing whitespace. This is now an error according to policy CMP0004.
My /usr/lib64/cmake/SDL2/sdl2-config.cmake looks like this (this is Gentoo Linux, from media-libs/libsdl2-2.0.4):
sdl2 cmake project-config input for ./configure scripts
There are a couple of tentative patches attached there, but not very well tested or very elegant, or robust; feel free to grab them from there and play.
I will try to remember to attach them here when they are more tested or if we decide to apply them.
On 2016-05-19 11:06:27 +0000, wrote:
Created attachment 2457
bug_822210_fix_sdl2-config.cmake_whitespace.patch
Patch created in Debian to address this issue
On 2016-08-14 06:00:15 +0000, Max wrote:
Will this patch make it into the next SDL release (2.0.5)? I'm not familiar with the bug lifecycle in the SDL2 ecosystem.
In my case, OSX Yosemite, SDL2 (2.0.4), when installed from brew, wont work with CMake 3.6 without plumbing into the sdl-config.cmake in the brew Cellar and removing the trailing spaces manually. As previously stated in this thread the patches recommended in the debian thread look kind of messy but the string(STRIP) command in your patch attachment seems like a safe and risk-free cross-platform solution to me.
On 2016-11-01 18:48:12 +0000, wrote:
With this applied in a commit included 2.0.5 [1], I think that this bug can be closed.
Minor nitpick: The patch is from me / Debian, not Ubuntu, and it was already attached to this bug report many months ago ;-)
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 2.0.4
Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2016-03-20 23:36:27 +0000, James Hogan wrote:
On 2016-04-29 10:49:52 +0000, wrote:
On 2016-05-19 11:06:27 +0000, wrote:
On 2016-08-14 06:00:15 +0000, Max wrote:
On 2016-11-01 18:48:12 +0000, wrote:
On 2016-11-02 17:50:35 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: