ALL: fixed mingw issues

master
Martin Gerhardy 2020-06-17 18:21:21 +02:00
parent a83599268b
commit 5822a410f0
9 changed files with 16 additions and 13 deletions

View File

@ -9,6 +9,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} -Wnon-virtual-dtor")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_C_FLAGS_DEBUG}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mwindows -static-libgcc -static-libstdc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lmingw32 -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lcomctl32 -lshell32 -lversion -luuid -lws2_32 -liphlpapi")
set(CMAKE_CXX_STANDARD_LIBRARIES ${CMAKE_CXX_STANDARD_LIBRARIES} ${CMAKE_C_STANDARD_LIBRARIES})

View File

@ -314,7 +314,9 @@
#include <basetsd.h>
typedef SSIZE_T ssize_t;
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#include <winnt.h>

View File

@ -51,7 +51,5 @@ set(COMPILER_SRCS
)
set_property(GLOBAL PROPERTY flatc_NOUNITY True)
engine_add_build_executable(TARGET flatc SRCS ${COMPILER_SRCS} NOINSTALL)
if(NOT CMAKE_CROSSCOMPILING)
target_link_libraries(flatc flatbuffers)
target_include_directories(flatc PRIVATE compiler/)
endif()
target_link_libraries(flatc flatbuffers)
target_include_directories(flatc PRIVATE compiler/)

View File

@ -32,9 +32,9 @@
#include "../../core/windows/SDL_windows.h"
#define COBJMACROS
#include <InitGuid.h>
#include <SensorsApi.h>
#include <Sensors.h>
#include <initguid.h>
#include <sensorsapi.h>
#include <sensors.h>
DEFINE_GUID(SDL_CLSID_SensorManager, 0x77A1C827, 0xFCD2, 0x4689, 0x89, 0x15, 0x9D, 0x61, 0x3C, 0xC5, 0xFA, 0x3E);
DEFINE_GUID(SDL_IID_SensorManager, 0xBD77DB67, 0x45A8, 0x42DC, 0x8D, 0x00, 0x6D, 0xCF, 0x15, 0xF8, 0x37, 0x7A);

View File

@ -11,7 +11,6 @@
#include "collection/List.h"
#include "core/concurrent/Atomic.h"
#include "core/SharedPtr.h"
#include <SDL_main.h>
#include <memory>
#include <stack>

View File

@ -6,7 +6,7 @@
#include "core/Log.h"
#include "core/Assert.h"
#include <string.h>
#ifdef WIN32
#ifdef __WINDOWS__
#define network_cleanup() WSACleanup()
#define network_return int
#else

View File

@ -7,10 +7,12 @@
#include "IMetricSender.h"
#include "core/String.h"
#include "core/concurrent/Lock.h"
#include <stdint.h>
#include "core/Trace.h"
#ifdef WIN32
#include <stdint.h>
#include <SDL_platform.h>
#ifdef __WINDOWS__
#ifndef NOMINMAX
#define NOMINMAX
#endif

View File

@ -4,7 +4,8 @@
#pragma once
#ifdef WIN32
#include <SDL_platform.h>
#ifdef __WINDOWS__
#ifndef NOMINMAX
#define NOMINMAX
#endif

View File

@ -13,6 +13,7 @@
#include "video/Types.h"
#include "video/Trace.h"
#include "video/Version.h"
#include <SDL_main.h>
#include <functional>
#include <glm/vec2.hpp>