Commit 7b5be264 authored by neverlord's avatar neverlord

Fix build on MinGW

parent aa72be06
......@@ -140,12 +140,13 @@ if(NOT APPLE AND NOT WIN32)
endif()
# extra setup steps needed on MinGW
if(MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32")
add_definitions(-D_WIN32_WINNT=0x0600)
add_definitions(-DWIN32)
include(GenerateExportHeader)
set(LD_FLAGS "ws2_32 -liphlpapi")
endif()
# needed by subprojects
set(LD_FLAGS ${CMAKE_LD_LIBS})
set(LD_FLAGS ${LD_FLAGS} ${CMAKE_LD_LIBS})
################################################################################
......
......@@ -154,6 +154,7 @@ std::vector<iface_info> get_mac_addresses() {
// windows
#include <ws2tcpip.h>
#include <winsock2.h>
#include <vector>
#include <string>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment