Open rootkea opened 8 months ago
I did find FindENet.cmake at https://github.com/stuntrally/stuntrally/blob/master/cmake/FindENet.cmake but I'm a cmake newbie so not sure exactly which part is relevant to us...
BTW, ENet provides libenet.pc
so maybe we can use pkg-config
within cmake
instead of maintaining our own FindENet.cmake
?
Moreover, I'm sorry but is there a strong a reason to maintain our own ENet in cdogs-sdl source? I mean upstream seems pretty active. Why aren't we upstreaming our ENet patches https://github.com/cxong/cdogs-sdl/commits/master/src/cdogs/enet ? It should ease the maintenance and also good for FLOSS. :)
BTW, ENet provides
libenet.pc
so maybe we can usepkg-config
withincmake
instead of maintaining our ownFindENet.cmake
?
In my opinion using pkg-config to find ENet would be better than writing and maintaining a custom CMake module that searches it.
It would be good to upstream any changes, but testing enet / networking is a lot of work, happy if anyone else is willing to look at it
Hello!
When I ask to use the shared ENet (
-DUSE_SHARED_ENET=ON
) cmake doesn't check for theenet
unlikeSDL2
. And so build files get written without any issue. It's theninja
which fails since it can't find theenet
as it's not installed on the system.I tried to check for
enet
in CMakeLists.txt but couldn't fix the issue as it seems we need to writeFindENet.cmake
. This is what I tried: