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 - CMake complains about trailing spaces in sdl2.pc
Summary: CMake complains about trailing spaces in sdl2.pc
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: 2.0.8
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-21 08:49 UTC by Azamat H. Hackimov
Modified: 2018-04-24 04:56 UTC (History)
0 users

See Also:


Attachments
libsdl2-2.0.8-rework-variables.patch (2.00 KB, patch)
2018-04-21 08:52 UTC, Azamat H. Hackimov
Details | Diff

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