From 4359bccfcbec2b149d4b01870897bf849e9a69ce Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Wed, 7 Aug 2024 17:45:56 +0200 Subject: [PATCH] fix the slirp shit some more --- src/net/CMakeLists.txt | 5 ++--- src/net/Net_Slirp.cpp | 2 +- src/net/Net_Slirp.h | 2 +- src/net/libslirp/CMakeLists.txt | 6 +++--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/net/CMakeLists.txt b/src/net/CMakeLists.txt index 0d4698df..62bb557c 100644 --- a/src/net/CMakeLists.txt +++ b/src/net/CMakeLists.txt @@ -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() diff --git a/src/net/Net_Slirp.cpp b/src/net/Net_Slirp.cpp index 2200b074..0386c586 100644 --- a/src/net/Net_Slirp.cpp +++ b/src/net/Net_Slirp.cpp @@ -23,7 +23,7 @@ #include "FIFO.h" #include "Platform.h" -#include +#include #ifdef __WIN32__ #include diff --git a/src/net/Net_Slirp.h b/src/net/Net_Slirp.h index 256b3058..5f9b6587 100644 --- a/src/net/Net_Slirp.h +++ b/src/net/Net_Slirp.h @@ -24,7 +24,7 @@ #include "Platform.h" #include "NetDriver.h" -#include +#include #ifdef __WIN32__ #include diff --git a/src/net/libslirp/CMakeLists.txt b/src/net/libslirp/CMakeLists.txt index 67b8ac78..99d0b3f7 100644 --- a/src/net/libslirp/CMakeLists.txt +++ b/src/net/libslirp/CMakeLists.txt @@ -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\"")