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")
|
||||
|
||||
if (BUILD_STATIC)
|
||||
add_library(slirp STATIC ${SOURCES})
|
||||
else()
|
||||
add_library(slirp ${SOURCES})
|
||||
endif()
|
||||
target_compile_definitions(slirp PRIVATE LIBSLIRP_STATIC_BUILD)
|
||||
|
||||
target_include_directories(slirp PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/glib")
|
||||
target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
|
|
|
@ -12,12 +12,16 @@
|
|||
#include <in6addr.h>
|
||||
#include <basetsd.h>
|
||||
typedef SSIZE_T slirp_ssize_t;
|
||||
#ifndef LIBSLIRP_STATIC_BUILD
|
||||
# ifdef BUILDING_LIBSLIRP
|
||||
# define SLIRP_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define SLIRP_EXPORT __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# define SLIRP_EXPORT
|
||||
#endif
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
typedef ssize_t slirp_ssize_t;
|
||||
#include <netinet/in.h>
|
||||
|
|
Loading…
Reference in New Issue