fix the slirp shit some more
This commit is contained in:
parent
b47563e888
commit
4359bccfcb
|
@ -16,9 +16,8 @@ option(USE_SYSTEM_LIBSLIRP "Use system libslirp instead of the bundled version"
|
||||||
if (USE_SYSTEM_LIBSLIRP)
|
if (USE_SYSTEM_LIBSLIRP)
|
||||||
pkg_check_modules(Slirp REQUIRED IMPORTED_TARGET slirp)
|
pkg_check_modules(Slirp REQUIRED IMPORTED_TARGET slirp)
|
||||||
fix_interface_includes(PkgConfig::Slirp)
|
fix_interface_includes(PkgConfig::Slirp)
|
||||||
target_link_libraries(net-utils PRIVATE PkgConfig::Slirp)
|
target_link_libraries(net-utils PUBLIC PkgConfig::Slirp)
|
||||||
else()
|
else()
|
||||||
add_subdirectory(libslirp EXCLUDE_FROM_ALL)
|
add_subdirectory(libslirp EXCLUDE_FROM_ALL)
|
||||||
target_include_directories(net-utils SYSTEM PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/libslirp/glib")
|
target_link_libraries(net-utils PUBLIC slirp)
|
||||||
target_link_libraries(net-utils PRIVATE slirp)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "FIFO.h"
|
#include "FIFO.h"
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
|
|
||||||
#include <slirp/libslirp.h>
|
#include <libslirp.h>
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
#include "NetDriver.h"
|
#include "NetDriver.h"
|
||||||
|
|
||||||
#include <slirp/libslirp.h>
|
#include <libslirp.h>
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
|
|
@ -49,9 +49,9 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/libslirp-version.h.in" "${CMAKE_
|
||||||
add_library(slirp STATIC ${SOURCES})
|
add_library(slirp STATIC ${SOURCES})
|
||||||
target_compile_definitions(slirp PUBLIC LIBSLIRP_STATIC_BUILD)
|
target_compile_definitions(slirp PUBLIC LIBSLIRP_STATIC_BUILD)
|
||||||
|
|
||||||
target_include_directories(slirp PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/glib")
|
target_include_directories(slirp SYSTEM PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/glib")
|
||||||
target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
target_include_directories(slirp SYSTEM PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||||
target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
|
target_include_directories(slirp SYSTEM PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
||||||
target_compile_definitions(slirp PRIVATE BUILDING_LIBSLIRP)
|
target_compile_definitions(slirp PRIVATE BUILDING_LIBSLIRP)
|
||||||
target_compile_definitions(slirp PRIVATE "G_LOG_DOMAIN=\"Slirp\"")
|
target_compile_definitions(slirp PRIVATE "G_LOG_DOMAIN=\"Slirp\"")
|
||||||
|
|
Loading…
Reference in New Issue