mirror of
https://github.com/libretro/glslang.git
synced 2025-02-22 00:13:17 +00:00
Merge pull request #203 from dneto0/wip-mingw
Support Linux-to-Windows cross compile via MinGW
This commit is contained in:
commit
b1dece2737
@ -32,8 +32,8 @@
|
||||
//POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
#include "../Include/PoolAlloc.h"
|
||||
#include "../Include/Common.h"
|
||||
#include "../Include/PoolAlloc.h"
|
||||
|
||||
#include "../Include/InitializeGlobals.h"
|
||||
#include "../OSDependent/osinclude.h"
|
||||
|
@ -48,7 +48,7 @@ namespace {
|
||||
bool is_positive_infinity(double x) {
|
||||
#ifdef _MSC_VER
|
||||
return _fpclass(x) == _FPCLASS_PINF;
|
||||
#elif defined __ANDROID__ || defined __linux__
|
||||
#elif defined __ANDROID__ || defined __linux__ || __MINGW32__ || __MINGW64__
|
||||
return std::isinf(x) && (x >= 0);
|
||||
#else
|
||||
return isinf(x) && (x >= 0);
|
||||
|
@ -4,6 +4,12 @@ set(SOURCES ossource.cpp ../osinclude.h)
|
||||
|
||||
add_library(OSDependent STATIC ${SOURCES})
|
||||
|
||||
# MinGW GCC complains about function pointer casts to void*.
|
||||
# Turn that off with -fpermissive.
|
||||
if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
|
||||
target_compile_options(OSDependent PRIVATE -fpermissive)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
source_group("Source" FILES ${SOURCES})
|
||||
endif(WIN32)
|
||||
|
Loading…
x
Reference in New Issue
Block a user