# include <stdint.h>
#endif
-#ifdef _MSC_VER
+#if defined _WIN32
# undef interface
#endif
target_compile_definitions(libmemcachedinternal PRIVATE -DBUILDING_LIBMEMCACHEDINTERNAL)
target_link_libraries(libmemcachedinternal PUBLIC libhashkit Threads::Threads ${CMAKE_DL_LIBS})
target_link_libraries(libmemcachedinternal PRIVATE p9y)
-if(MSVC)
+if(MSVC OR MINGW)
target_link_libraries(libmemcached PUBLIC wsock32 ws2_32)
endif()
if(HAVE_LIBSASL)
endif()
target_link_libraries(libmemcachedprotocol PRIVATE p9y)
target_link_libraries(libmemcachedprotocol PUBLIC Threads::Threads)
-if(MSVC)
+if(MSVC OR MINGW)
target_link_libraries(libmemcachedprotocol PUBLIC wsock32 ws2_32)
endif()
target_include_directories(libmemcachedprotocol PRIVATE
LINK_FLAGS "-Wl,-undefined,dynamic_lookup"
)
endif()
-if(MSVC)
- set_target_properties(libmemcachedutil PROPERTIES
- LINK_FLAGS "/FORCE:UNRESOLVED"
- )
+if(MSVC OR MINGW)
+ target_link_libraries(libmemcachedutil PUBLIC libmemcached)
endif()
target_link_libraries(libmemcachedutil PUBLIC Threads::Threads)
if(HAVE_LIBSASL)
#include <cassert>
#include <cerrno>
#include <cstring>
+#include <ctime>
#include <pthread.h>
#include <memory>