Link against shlwapi.lib and unify linker input sources for Windows

This commit is contained in:
kwolekr 2015-04-08 12:55:06 -04:00
parent d2fc98e4a6
commit c758fd73ff
2 changed files with 8 additions and 9 deletions

View File

@ -195,8 +195,10 @@ if(WIN32)
# Surpress some useless warnings
add_definitions ( /D "_CRT_SECURE_NO_DEPRECATE" /W1 )
else() # Probably MinGW = GCC
set(PLATFORM_LIBS ws2_32.lib)
set(PLATFORM_LIBS "")
endif()
set(PLATFORM_LIBS ws2_32.lib shlwapi.lib ${PLATFORM_LIBS})
# Zlib stuff
set(ZLIB_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/../../zlib/zlib-1.2.5"
CACHE PATH "Zlib include directory")

View File

@ -44,9 +44,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#ifdef _MSC_VER
#pragma comment(lib, "ws2_32.lib")
#endif
typedef SOCKET socket_t;
typedef int socklen_t;
#else