Clean up MINGW fixes

This commit is contained in:
Christian W. Zuckschwerdt 2018-09-06 15:39:25 +02:00
parent 02cec434a8
commit d56de9c8ab
3 changed files with 6 additions and 11 deletions

View file

@ -97,6 +97,10 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Profile")
ADD_DEFINITIONS(-fno-builtin-free)
endif()
if(MINGW)
list(APPEND NET_LIBRARIES ws2_32 mswsock)
endif()
########################################################################
# Setup the include and linker paths
########################################################################

View file

@ -121,20 +121,14 @@ add_executable(rtl_433
)
add_library(data data.c)
if(MINGW)
target_link_libraries(data ws2_32 mswsock)
endif()
target_link_libraries(data ${NET_LIBRARIES})
target_link_libraries(rtl_433
${SDR_LIBRARIES}
${NET_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
if(MINGW)
target_link_libraries(rtl_433 ws2_32 mswsock)
endif()
set(INSTALL_TARGETS rtl_433)
if(UNIX)
target_link_libraries(rtl_433 m)

View file

@ -15,9 +15,6 @@
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#ifndef _WIN32
#include <sys/uio.h>
#endif
#include <unistd.h>
#include <time.h>