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 2474

Summary: don't explicitly reference SDL2 target in install()
Product: SDL Reporter: Anthony Pesch <inolen>
Component: buildAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: fredrik.zetterman
Version: 2.0.3Keywords: target-2.0.4, triage-2.0.4
Hardware: x86   
OS: Other   
Attachments: patch for bug

Description Anthony Pesch 2014-04-01 17:31:56 UTC
Created attachment 1600 [details]
patch for bug

I link with SDL2 statically, using CMake's add_subdirectory to include it in my project.

This works fine for Unix systems, but on Windows it breaks due to the final install() command referencing the SDL2 target which is only defined if building a shared library.

The following patch resolves the issue for me, and as far as I can tell from reading the CMake documentation seems correct. I don't believe there are any other side effects of specifying "RUNTIME DESTINATION" on all platforms.
Comment 1 Sam Lantinga 2014-04-18 05:32:14 UTC
*** Bug 2478 has been marked as a duplicate of this bug. ***
Comment 2 Sam Lantinga 2014-04-18 05:33:05 UTC
Ryan, can you look at this?
Comment 3 Ryan C. Gordon 2015-02-19 06:32:16 UTC
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry
if you got a lot of email from this. This is to help me sort through some bugs
in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4,
though!
Comment 4 Ryan C. Gordon 2015-04-07 04:57:59 UTC
(sorry if you get a lot of copies of this email, I'm marking several bugs at once)

Marking bugs for the (mostly) final 2.0.4 TODO list. This means we're hoping to resolve this bug before 2.0.4 ships if possible. In a perfect world, the open bug count with the target-2.0.4 keyword is zero when we ship.

(Note that closing a bug report as WONTFIX, INVALID or WORKSFORME might still happen.)

--ryan.
Comment 5 Ryan C. Gordon 2015-04-23 00:37:59 UTC
It looks like someone else put a similar fix in, but yours looks better, so now it's https://hg.libsdl.org/SDL/rev/5e3a1adadfbb, thanks!

--ryan.