fix the slirp shit some more

This commit is contained in:
Nadia Holmquist Pedersen 2024-08-07 17:45:56 +02:00
parent b47563e888
commit 4359bccfcb
4 changed files with 7 additions and 8 deletions

View File

@ -16,9 +16,8 @@ option(USE_SYSTEM_LIBSLIRP "Use system libslirp instead of the bundled version"
if (USE_SYSTEM_LIBSLIRP)
pkg_check_modules(Slirp REQUIRED IMPORTED_TARGET slirp)
fix_interface_includes(PkgConfig::Slirp)
target_link_libraries(net-utils PRIVATE PkgConfig::Slirp)
target_link_libraries(net-utils PUBLIC PkgConfig::Slirp)
else()
add_subdirectory(libslirp EXCLUDE_FROM_ALL)
target_include_directories(net-utils SYSTEM PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/libslirp/glib")
target_link_libraries(net-utils PRIVATE slirp)
target_link_libraries(net-utils PUBLIC slirp)
endif()

View File

@ -23,7 +23,7 @@
#include "FIFO.h"
#include "Platform.h"
#include <slirp/libslirp.h>
#include <libslirp.h>
#ifdef __WIN32__
#include <ws2tcpip.h>

View File

@ -24,7 +24,7 @@
#include "Platform.h"
#include "NetDriver.h"
#include <slirp/libslirp.h>
#include <libslirp.h>
#ifdef __WIN32__
#include <ws2tcpip.h>

View File

@ -49,9 +49,9 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/libslirp-version.h.in" "${CMAKE_
add_library(slirp STATIC ${SOURCES})
target_compile_definitions(slirp PUBLIC LIBSLIRP_STATIC_BUILD)
target_include_directories(slirp PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/glib")
target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
target_include_directories(slirp SYSTEM PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/glib")
target_include_directories(slirp SYSTEM PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_include_directories(slirp SYSTEM PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
target_compile_definitions(slirp PRIVATE BUILDING_LIBSLIRP)
target_compile_definitions(slirp PRIVATE "G_LOG_DOMAIN=\"Slirp\"")