Fedora uses "lib64" for the CMake output directory. The current search
path is limited to "lib". This fix searches in "lib" and "lib64 for
applicable libraries in a bundled build.
with tag release-2.0.16. Removed the old patches. Simplified the build script.
Added support for custom SDL2 toolchain and build profile. Removed bundled
include files.
Just like Windows, we should be copying the dynamic library to the
target directory and deps directory. Otherwise, execution may fail,
or, more likely, silently pick up the system libSDL2 and not the
"bundled" one as asked.
This is evident when trying to run tests on a system with the libsdl2
package uninstalled, where all the example tests fail unless they pick
up the system .so.
Fixed by staging dll in deps directory.
This is required for running comment examples as tests, which otherwise
don't seem to be picking up the dll in library path when it is only
dropped in the top most target_path.
Fixes
```
failures:
src/sdl2\event.rs - event::EventSender::push_custom_event (line 2874)
src/sdl2\event.rs - event::crate::EventSubsystem::add_event_watch (line 244)
src/sdl2\event.rs - event::crate::EventSubsystem::push_custom_event (line 203)
src/sdl2\event.rs - event::crate::EventSubsystem::register_event (line 135)
src/sdl2\rect.rs - rect::Rect::has_intersection (line 482)
src/sdl2\rect.rs - rect::Rect::intersection (line 504)
src/sdl2\rect.rs - rect::Rect::union (line 536)
```
when running `cargo test --features bundled` on Windows.
vcpkg has been updated to fix the link ordering of the brotli libraries.
This means that vcpkg rev can now point at upstream again. Version
a267ab1 is current HEAD.
When building for "bundled" dynamic library on Windows, VS2019
encounters a link error as it is generating an intrinsic for memset but
the cmake build misses linking in the code for it.
Fix by cherrypicking upstream patch that works around the problem by
telling the compiler to generate actual function calls to it.
https://github.com/libsdl-org/SDL/issues/3865
Upstream SDL2 will include _fltused in the libary artifact as a
__declspec(selectany) symbol. This seems to cause problems however with
a definition already coming from the top-most rust link, as it already
gets defined elsewhere when building statically.
Rather than patching the upstream codebase with another patch, just
specify this flag in all cases as we don't require it in any of our rust
builds.