mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 01:49:42 -06:00
Vendored libslirp (#2045)
Add vendored libslirp into the repo with a shim to remove its dependency on glib.
This commit is contained in:

committed by
GitHub

parent
747f50de98
commit
a2406e3c0e
@ -84,7 +84,6 @@ if (BUILD_STATIC)
|
||||
endif()
|
||||
|
||||
pkg_check_modules(SDL2 REQUIRED IMPORTED_TARGET sdl2)
|
||||
pkg_check_modules(Slirp REQUIRED slirp)
|
||||
pkg_check_modules(LibArchive REQUIRED IMPORTED_TARGET libarchive)
|
||||
pkg_check_modules(Zstd REQUIRED IMPORTED_TARGET libzstd)
|
||||
|
||||
@ -94,6 +93,17 @@ add_compile_definitions(ARCHIVE_SUPPORT_ENABLED)
|
||||
|
||||
add_executable(melonDS ${SOURCES_QT_SDL})
|
||||
|
||||
option(USE_SYSTEM_LIBSLIRP "Use system libslirp instead of the bundled version" OFF)
|
||||
if (USE_SYSTEM_LIBSLIRP)
|
||||
pkg_check_modules(Slirp REQUIRED IMPORTED_TARGET slirp)
|
||||
target_link_libraries(melonDS PRIVATE PkgConfig::Slirp)
|
||||
else()
|
||||
add_subdirectory("../libslirp"
|
||||
"${CMAKE_BINARY_DIR}/libslirp"
|
||||
EXCLUDE_FROM_ALL)
|
||||
target_link_libraries(melonDS PRIVATE slirp)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(melonDS PUBLIC opengl32)
|
||||
|
||||
@ -163,9 +173,6 @@ target_link_libraries(melonDS PRIVATE core)
|
||||
target_link_libraries(melonDS PRIVATE PkgConfig::SDL2 PkgConfig::LibArchive PkgConfig::Zstd)
|
||||
target_link_libraries(melonDS PRIVATE ${QT_LINK_LIBS} ${CMAKE_DL_LIBS})
|
||||
|
||||
target_include_directories(melonDS PRIVATE "${Slirp_INCLUDE_DIRS}")
|
||||
target_link_libraries(melonDS PRIVATE "${Slirp_LINK_LIBRARIES}")
|
||||
|
||||
if (WIN32)
|
||||
option(PORTABLE "Make a portable build that looks for its configuration in the current directory" ON)
|
||||
|
||||
|
Reference in New Issue
Block a user