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 4144

Summary: CMake complains about trailing spaces in sdl2.pc
Product: SDL Reporter: Azamat H. Hackimov <azamat.hackimov>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.8   
Hardware: x86_64   
OS: Linux   
Attachments: libsdl2-2.0.8-rework-variables.patch

Description Azamat H. Hackimov 2018-04-21 08:49:53 UTC
When you try use SDL2 2.0.8 in CMake project in Linux, it complains about trailing spaces in sdl2.pc:

CMake Error at CMakeLists.txt:147 (add_executable):
  Target "TestSimpleMain" links to item "-L/usr/lib64 -lSDL2 " which has
  leading or trailing whitespace.  This is now an error according to policy
  CMP0004.
Comment 1 Azamat H. Hackimov 2018-04-21 08:52:13 UTC
Created attachment 3226 [details]
libsdl2-2.0.8-rework-variables.patch

Proposed fix.
Comment 2 Sam Lantinga 2018-04-24 04:52:36 UTC
I don't think Bourne shell supports += on shell variables. Bash does, but the Bourne shell (/bin/sh) doesn't.
Comment 3 Sam Lantinga 2018-04-24 04:56:20 UTC
This should fix it, thanks!
https://hg.libsdl.org/SDL/rev/28be2719184c