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

CMake: Fix linking for Windows builds with non-MinGW compilers #241

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

Croydon
Copy link
Contributor

@Croydon Croydon commented Apr 15, 2024

There are many open pull requests that have this change already included, but via #174 @lsalzman wishes for atomic pull requests.

So this pull request applies a minimal change to have CMake outputting functional Windows builds, while compiling with compilers other than MinGW.

Windows builds of enet always need to get linked to winmm and ws2_32.

if(WIN32) is true when the target platform is Windows, so this works for cross-compiling and native compiling with any compiler.

@Croydon Croydon changed the title CMake: Fix linking for Windows builds on non-MinGW compilers CMake: Fix linking for Windows builds with non-MinGW compilers Apr 15, 2024
@lsalzman lsalzman merged commit 276ff5a into lsalzman:master Apr 17, 2024
6 checks passed
@Croydon Croydon deleted the fix_non-mingw_windows_builds branch April 17, 2024 14:42
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