MinGW support

This commit is contained in:
kokokoshka 2021-06-15 10:36:55 +03:00 committed by Bjorn
parent 526e06d445
commit 7e52ffe956
2 changed files with 7 additions and 3 deletions

View File

@ -595,7 +595,11 @@ endforeach()
if(WIN32)
target_sources(lovr PRIVATE src/core/os_win32.c)
target_sources(lovr PRIVATE src/resources/lovr.rc)
set_target_properties(lovr PROPERTIES COMPILE_FLAGS "/wd4244 /MP")
if (MSVC)
set_target_properties(lovr PROPERTIES COMPILE_FLAGS "/wd4244 /MP")
else()
set_target_properties(lovr PROPERTIES COMPILE_FLAGS "-MP")
endif()
set_target_properties(lovr PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:console /ENTRY:WinMainCRTStartup")
set_target_properties(lovr PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:windows /ENTRY:WinMainCRTStartup")
target_compile_definitions(lovr PRIVATE _CRT_SECURE_NO_WARNINGS)

View File

@ -2,8 +2,8 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shellapi.h>
#include <KnownFolders.h>
#include <ShlObj.h>
#include <knownfolders.h>
#include <shlobj.h>
#include <stdio.h>
#include "os_glfw.h"