Fix MSVC static library + regular builds via CMake #224
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
due to cmake quirks, you can't specify a white-space only library name. CMake genuinely tries to link a " .lib" resulting in build failures.
With how the headers are written, if you want to static-link soundio, SOUNDIO_STATIC_LIBRARY must be defined during compile - this suppresses the DLL export/import declarations - if this is not done, you get errors about missing imp... symbols during link due to the symbol munging that MSVC uses for DLL import libraries. Export the symbol through the CMAKE mechanisms by declaring it PUBLIC.