fix slirp includes

This accidentally worked locally because I had it installed
Also explains the weird error I got about struct sizes being different...
This commit is contained in:
Nadia Holmquist Pedersen 2024-05-15 15:54:08 +02:00
parent 679e5b9c17
commit e33cbb4018
2 changed files with 3 additions and 5 deletions

View File

@ -49,11 +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_include_directories(slirp PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/glib") 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_SOURCE_DIR}/src")
target_include_directories(slirp PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
target_compile_definitions(slirp PRIVATE BUILDING_LIBSLIRP) target_compile_definitions(slirp PRIVATE BUILDING_LIBSLIRP)
set_target_properties(slirp PROPERTIES INTERPROCEDURAL_OPTIMIZATION OFF)
set_target_properties(slirp PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF)
if (WIN32) if (WIN32)
target_link_libraries(slirp PRIVATE ws2_32 iphlpapi) target_link_libraries(slirp PRIVATE ws2_32 iphlpapi)
@ -61,4 +59,4 @@ elseif(HAIKU)
target_Link_libraries(slirp PRIVATE network) target_Link_libraries(slirp PRIVATE network)
elseif(APPLE) elseif(APPLE)
target_link_libraries(slirp PRIVATE resolv) target_link_libraries(slirp PRIVATE resolv)
endif() endif()

View File

@ -26,7 +26,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>