Browse Source

Fix compiling on windows

pull/1/head
Xadhoom 5 years ago
parent
commit
97a405529d
  1. 14
      CMakeLists.txt
  2. 1
      include/mingw-fixes/Synchapi.h
  3. 3
      src/VirtualTap.hpp

14
CMakeLists.txt

@ -439,13 +439,13 @@ set_target_properties (${STATIC_LIB_NAME} PROPERTIES
OUTPUT_NAME zt
LIBRARY_OUTPUT_DIRECTORY ${INTERMEDIATE_LIBRARY_OUTPUT_PATH})
set_target_properties (${STATIC_LIB_NAME} PROPERTIES COMPILE_FLAGS "${ZT_FLAGS}")
if (BUILDING_WIN)
target_link_libraries (
${STATIC_LIB_NAME}
${ws2_32_LIBRARY_PATH}
${shlwapi_LIBRARY_PATH}
${iphlpapi_LIBRARY_PATH})
endif ()
#if (BUILDING_WIN)
# target_link_libraries (
# ${STATIC_LIB_NAME}
# ${ws2_32_LIBRARY_PATH}
# ${shlwapi_LIBRARY_PATH}
# ${iphlpapi_LIBRARY_PATH})
#endif ()
# libzt.so/dylib/dll
add_library (${DYNAMIC_LIB_NAME} SHARED ${libztSrcGlob})

1
include/mingw-fixes/Synchapi.h

@ -0,0 +1 @@
#include <synchapi.h>

3
src/VirtualTap.hpp

@ -119,7 +119,8 @@ public:
void threadMain()
throw();
#if defined(__MINGW32__)
//#if defined(__MINGW32__)
#if 0
/* The following is merely to make ZeroTier's OneService happy while building on Windows.
we won't use these in libzt */
NET_LUID _deviceLuid;

Loading…
Cancel
Save