Revert slirp dynamic/static check, and make it not use dllimport/export
when building statically
This commit is contained in:
parent
d21bc64cb3
commit
cfc49eb286
|
@ -46,11 +46,8 @@ set(SOURCES
|
||||||
|
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/libslirp-version.h.in" "${CMAKE_CURRENT_BINARY_DIR}/libslirp-version.h")
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/libslirp-version.h.in" "${CMAKE_CURRENT_BINARY_DIR}/libslirp-version.h")
|
||||||
|
|
||||||
if (BUILD_STATIC)
|
add_library(slirp STATIC ${SOURCES})
|
||||||
add_library(slirp STATIC ${SOURCES})
|
target_compile_definitions(slirp PRIVATE LIBSLIRP_STATIC_BUILD)
|
||||||
else()
|
|
||||||
add_library(slirp ${SOURCES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
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")
|
||||||
|
|
|
@ -12,10 +12,14 @@
|
||||||
#include <in6addr.h>
|
#include <in6addr.h>
|
||||||
#include <basetsd.h>
|
#include <basetsd.h>
|
||||||
typedef SSIZE_T slirp_ssize_t;
|
typedef SSIZE_T slirp_ssize_t;
|
||||||
#ifdef BUILDING_LIBSLIRP
|
#ifndef LIBSLIRP_STATIC_BUILD
|
||||||
|
# ifdef BUILDING_LIBSLIRP
|
||||||
# define SLIRP_EXPORT __declspec(dllexport)
|
# define SLIRP_EXPORT __declspec(dllexport)
|
||||||
#else
|
# else
|
||||||
# define SLIRP_EXPORT __declspec(dllimport)
|
# define SLIRP_EXPORT __declspec(dllimport)
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define SLIRP_EXPORT
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
Loading…
Reference in New Issue