ruabmbua / enet-sys

Raw rust bindings to the enet C library
MIT License
19 stars 14 forks source link

Fix(build): Remove broken directives for windows compilation #20

Closed magicaldave closed 1 year ago

ruabmbua commented 1 year ago

I am curious, do you have any problems building on windows from master? When I try this patch it starts failing for me, since cmake automatically seems to put the artifacts into Debug or Release subfolders.

magicaldave commented 1 year ago

Ah, yes, I haven't had the chance to correctly update this yet! When cross compiling on a non-windows host, for a Windows target, this patch fixes those builds, as enet itself doesn't end up in Debug/Release folders. However I did notice later during a CI build that an actual windows host does still need the original rule. So it actually needs to be modified to determine whether it's also a windows host, not target, doing the compile.

ruabmbua commented 1 year ago

b.t.w. see this issue that someone else had almost at the same time: https://github.com/ruabmbua/enet-sys/issues/21

I will work out a proper fix, probably by patching the C libraries cmake build system to add a proper install target.

ruabmbua commented 1 year ago

Closed in favor of closed in favor of https://github.com/ruabmbua/enet-sys/pull/22

ruabmbua commented 1 year ago

@magicaldave can you try to build with the version from #22? I struggle to get anything to build on mingw (I am not a windows user).