mirror of https://github.com/mgba-emu/mgba.git
Windows: Fix compilation woes from last commit
This commit is contained in:
parent
3571b112dc
commit
c541a79e95
|
@ -16,6 +16,19 @@
|
|||
|
||||
CXX_GUARD_START
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
// Require Windows 7 or newer
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0601
|
||||
#elif _WIN32_WINNT < 0x0601
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0601
|
||||
#endif
|
||||
// WinSock2 gets very angry if it's included too late
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -31,11 +44,6 @@ CXX_GUARD_START
|
|||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
// WinSock2 gets very angry if it's included too late
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) || defined(__cplusplus)
|
||||
#define restrict __restrict
|
||||
#endif
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
#include <mgba-util/common.h>
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#define THREAD_ENTRY DWORD WINAPI
|
||||
typedef THREAD_ENTRY ThreadEntry(LPVOID);
|
||||
#define THREAD_EXIT(RES) return RES
|
||||
|
|
|
@ -125,7 +125,6 @@ target_link_libraries(${BINARY_NAME}-sdl ${BINARY_NAME} ${PLATFORM_LIBRARY} ${OP
|
|||
if(NOT WIN32)
|
||||
set_target_properties(${BINARY_NAME}-sdl PROPERTIES OUTPUT_NAME ${BINARY_NAME})
|
||||
else()
|
||||
target_compile_definitions(${BINARY_NAME}-sdl PRIVATE _WIN32_WINNT=0x0600)
|
||||
set_target_properties(${BINARY_NAME}-sdl PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
install(TARGETS ${BINARY_NAME}-sdl DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${BINARY_NAME}-sdl)
|
||||
|
|
Loading…
Reference in New Issue