Bug 1366868

Summary: File sdl2-config.cmake has some extra and trailing whitespaces.
Product: [Fedora] Fedora Reporter: Jacek Migacz <jacekmigacz>
Component: SDL2Assignee: Igor Gnatenko <ignatenko>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: ignatenko, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: SDL2-2.0.4-8.fc24 SDL2-2.0.4-8.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-18 03:50:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jacek Migacz 2016-08-13 18:21:19 UTC
Description of problem:
sdl2-config.cmake from package has some whitespace characters in the middle and at the end of SDL2_LIBRRIES value. It looks like this:
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR}  -lSDL2 ")
This is a violation of CMP0004 (https://cmake.org/cmake/help/v3.0/policy/CMP0004.html).


Version-Release number of selected component (if applicable):
2.0.4-6.fc24 (x86_64)


How reproducible:
By using CMake's find_package:
find_package(SDL2 REQUIRED)


Steps to Reproduce:
1. Create a valid CMakeLists.txt with find_package.
2. Run cmake.


Actual results:
CMake Error at CMakeLists.txt:<some_line> (add_library):
  Target "sdl2" links to item "-L/usr/lib64 -lSDL2 " which has leading or
  trailing whitespace.  This is now an error according to policy CMP0004.


Expected results:
No error.

Additional info:
None.

Comment 1 Jacek Migacz 2016-08-13 18:23:20 UTC
Upstream template of tag 2.0.4 (http://hg.libsdl.org/SDL/file/e12c38730512/sdl2-config.cmake.in) is:
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} @SDL_RLD_FLAGS@ @SDL_LIBS@")

Comment 2 Igor Gnatenko 2016-08-13 19:07:36 UTC
Could you report this bug to upstream please?

Comment 4 Fedora Update System 2016-08-14 07:51:07 UTC
SDL2-2.0.4-8.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-80286cd005

Comment 5 Fedora Update System 2016-08-14 07:51:14 UTC
SDL2-2.0.4-8.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-03504c1a77

Comment 6 Fedora Update System 2016-08-15 18:27:28 UTC
SDL2-2.0.4-8.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-03504c1a77

Comment 7 Fedora Update System 2016-08-16 05:56:52 UTC
SDL2-2.0.4-8.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-80286cd005

Comment 8 Fedora Update System 2016-08-18 03:50:53 UTC
SDL2-2.0.4-8.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2016-08-27 10:32:55 UTC
SDL2-2.0.4-8.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.