mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-29 00:59:56 -06:00
Backport LAN (#2131)
backport the old LAN feature to the modern melonDS codebase.
This commit is contained in:
@ -6,6 +6,9 @@ add_library(net-utils STATIC
|
||||
Net_Slirp.cpp
|
||||
PacketDispatcher.cpp
|
||||
LocalMP.cpp
|
||||
LAN.cpp
|
||||
Netplay.cpp
|
||||
MPInterface.cpp
|
||||
)
|
||||
|
||||
target_include_directories(net-utils PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
@ -21,3 +24,12 @@ else()
|
||||
add_subdirectory(libslirp EXCLUDE_FROM_ALL)
|
||||
target_link_libraries(net-utils PUBLIC slirp)
|
||||
endif()
|
||||
|
||||
if (USE_VCPKG)
|
||||
find_package(unofficial-enet CONFIG REQUIRED)
|
||||
target_link_libraries(net-utils PRIVATE unofficial::enet::enet)
|
||||
else()
|
||||
pkg_check_modules(ENet REQUIRED IMPORTED_TARGET libenet)
|
||||
fix_interface_includes(PkgConfig::ENet)
|
||||
target_link_libraries(net-utils PUBLIC PkgConfig::ENet)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user