mirror of
https://github.com/glfw/glfw.git
synced 2024-11-23 02:25:10 +00:00
Added initial Linux MinGW-w64 support.
This commit is contained in:
parent
812ad163eb
commit
8d2c2791c2
15
CMake/linux-amd64-mingw32msvc.cmake
Normal file
15
CMake/linux-amd64-mingw32msvc.cmake
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Define the cross compilation environment for cross compiling from linux
|
||||||
|
# to Win64 it is to be used when Debian cross compilation toolchain is
|
||||||
|
# available.
|
||||||
|
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
|
||||||
|
SET(CMAKE_SYSTEM_VERSION 1) # Not really used.
|
||||||
|
SET(CMAKE_C_COMPILER "amd64-mingw32msvc-gcc")
|
||||||
|
SET(CMAKE_CXX_COMPILER "amd64-mingw32msvc-g++")
|
||||||
|
SET(CMAKE_RANLIB "amd64-mingw32msvc-ranlib")
|
||||||
|
|
||||||
|
|
||||||
|
#Configure the behaviour of the find commands
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH "/usr/amd64-mingw32msvc")
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
@ -67,6 +67,12 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#endif /* APIENTRY */
|
#endif /* APIENTRY */
|
||||||
|
|
||||||
|
/* TEMPORARY MinGW-w64 hacks.
|
||||||
|
*/
|
||||||
|
#if __MINGW64__
|
||||||
|
#define WINAPI
|
||||||
|
#include <stddef.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The following three defines are here solely to make some Windows-based
|
/* The following three defines are here solely to make some Windows-based
|
||||||
* <GL/gl.h> files happy. Theoretically we could include <windows.h>, but
|
* <GL/gl.h> files happy. Theoretically we could include <windows.h>, but
|
||||||
|
@ -200,7 +200,7 @@ int _glfwPlatformInit(void)
|
|||||||
// as possible in the hope of still being the foreground process)
|
// as possible in the hope of still being the foreground process)
|
||||||
SystemParametersInfo(SPI_GETFOREGROUNDLOCKTIMEOUT, 0,
|
SystemParametersInfo(SPI_GETFOREGROUNDLOCKTIMEOUT, 0,
|
||||||
&_glfwLibrary.Win32.foregroundLockTimeout, 0);
|
&_glfwLibrary.Win32.foregroundLockTimeout, 0);
|
||||||
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, (LPVOID) 0,
|
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, UIntToPtr(0),
|
||||||
SPIF_SENDCHANGE);
|
SPIF_SENDCHANGE);
|
||||||
|
|
||||||
if (!initLibraries())
|
if (!initLibraries())
|
||||||
@ -246,7 +246,7 @@ int _glfwPlatformTerminate(void)
|
|||||||
|
|
||||||
// Restore previous FOREGROUNDLOCKTIMEOUT system setting
|
// Restore previous FOREGROUNDLOCKTIMEOUT system setting
|
||||||
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0,
|
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0,
|
||||||
(LPVOID) _glfwLibrary.Win32.foregroundLockTimeout,
|
UIntToPtr(_glfwLibrary.Win32.foregroundLockTimeout),
|
||||||
SPIF_SENDCHANGE);
|
SPIF_SENDCHANGE);
|
||||||
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
|
@ -51,7 +51,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// GLFW requires Windows XP
|
// GLFW requires Windows XP
|
||||||
|
#ifndef WINVER
|
||||||
#define WINVER 0x0501
|
#define WINVER 0x0501
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user