|
|
@@ -21,10 +21,10 @@
|
|
|
#
|
|
|
|
|
|
# Certain MinGW versions fail to compile SSE code. This is the initial guess for known "bad" version range, and can be tightened later
|
|
|
-if (WIN32 AND NOT MSVC)
|
|
|
+if (MINGW)
|
|
|
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
|
|
|
if (GCC_VERSION VERSION_LESS 4.9.1)
|
|
|
- message ("Disabling SSE by default due to MinGW version. It is recommended to upgrade to MinGW with GCC >= 4.9.1. You can also try to re-enable SSE with CMake option -DURHO3D_SSE=1, but this may result in compile errors.")
|
|
|
+ message (WARNING "Disabling SSE by default due to MinGW version. It is recommended to upgrade to MinGW with GCC >= 4.9.1. You can also try to re-enable SSE with CMake option -DURHO3D_SSE=1, but this may result in compile errors.")
|
|
|
set (URHO3D_DEFAULT_SSE FALSE)
|
|
|
else ()
|
|
|
set (URHO3D_DEFAULT_SSE TRUE)
|
|
|
@@ -286,7 +286,7 @@ else ()
|
|
|
endif ()
|
|
|
endif ()
|
|
|
# MinGW-specific setup
|
|
|
- if (WIN32)
|
|
|
+ if (MINGW)
|
|
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static -static-libgcc -fno-keep-inline-dllexport")
|
|
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static -static-libstdc++ -static-libgcc -fno-keep-inline-dllexport")
|
|
|
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static")
|