Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cmake build failure when using multi-config generators #1343

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Fix cmake build failure when using multi-config generators #1343

merged 1 commit into from
Oct 24, 2023

Conversation

AMS21
Copy link
Contributor

@AMS21 AMS21 commented Oct 24, 2023

While playing around with this library I notices an annoying problem.

When building the library with the bundled feature and having the CMAKE_GENERATOR environment variable set to a so called multi-config generator like Ninja Multi-Config the build for sdl2 fails.

This patch fixes this annoyance by simply also settings the CMAKE_CONFIGURATION_TYPES for these builds since the normal CMAKE_BUILD_TYPE variable is ignored when using multi-config generators.

With that we essentially create a single-config build for our multi-config generator which builds without problems.

By also setting `CMAKE_CONFIGURATION_TYPES` to the required config the
build no longer fails.
@Cobrand Cobrand merged commit 77c1eb4 into Rust-SDL2:master Oct 24, 2023
17 checks passed
@AMS21 AMS21 deleted the fix/bundled_build_with_multi_config_ninja branch October 24, 2023 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants