Disable enet on emscripten;

UDP doesn't work properly.
This commit is contained in:
bjorn 2020-10-26 02:44:23 -06:00
parent 1a1605f9ce
commit 64f9a310c3
1 changed files with 1 additions and 7 deletions

View File

@ -73,24 +73,18 @@ elseif(UNIX)
endif()
# enet
if(LOVR_ENABLE_ENET)
if(LOVR_ENABLE_ENET AND NOT EMSCRIPTEN)
if(LOVR_SYSTEM_ENET)
pkg_search_module(ENET REQUIRED enet)
include_directories(${ENET_INCLUDE_DIRS})
set(LOVR_ENET ${ENET_LIBRARIES})
else()
if(EMSCRIPTEN)
set(HAVE_HAS_SOCKLEN_T TRUE CACHE BOOL "")
endif()
add_subdirectory(deps/enet enet)
include_directories(deps/enet/include)
set(LOVR_ENET enet)
if(WIN32)
set(LOVR_ENET ${LOVR_ENET} ws2_32 winmm)
endif()
if(EMSCRIPTEN)
target_compile_definitions(enet PRIVATE __APPLE__)
endif()
endif()
endif()