CMake: Put "winsock2.h" before "windows.h" during configure checks

"windows.h" includes "winsock.h" what causes many redefinition errors
if "winsock2.h" is included afterwards and can cause build to fail.
This commit is contained in:
Jakub Zakrzewski 2015-09-16 17:27:13 +02:00 коммит произвёл Daniel Stenberg
Родитель 0110cced2a
Коммит 7c478cad57
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -10,8 +10,8 @@ endmacro(add_header_include)
set(signature_call_conv)
if(HAVE_WINDOWS_H)
add_header_include(HAVE_WINDOWS_H "windows.h")
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
add_header_include(HAVE_WINDOWS_H "windows.h")
add_header_include(HAVE_WINSOCK_H "winsock.h")
set(_source_epilogue
"${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif")