Mindwerks / wildmidi

WildMIDI is a simple software midi player which has a core softsynth library that can be used with other applications.
https://github.com/Mindwerks/wildmidi
Other
201 stars 41 forks source link

CMake: Always generate static library target but only add it to "all" & "install" targets if WANT_STATIC is ON #225

Closed mcejp closed 3 years ago

mcejp commented 3 years ago

This makes it easier to use Wildmidi as a Git submodule, and I don't see any downsides to the change.

Without this change, the target libwildmidi_static is not generated at all unless WANT_STATIC==ON, so a project that wants to embed Wildmidi statically has to override the un-prefixed, global option WANT_STATIC, which just feels messy and wrong.

I've checked my changes against CMake 3.1 docs.

psi29a commented 3 years ago

That's great, thank you.