From 24e3a7ad17beecfa9c4bf0ca101acef5ce78378e Mon Sep 17 00:00:00 2001 From: alef Date: Sat, 20 Jan 2024 19:36:54 +0100 Subject: [PATCH] Detect running under MSYS and MINGW --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index da757a41c331b..d19d4fca5b200 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,9 @@ endif () include(CheckCXXCompilerFlag) +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set(MSYS2 True) +endif() #FIXME: Add dest build choice: m32 for 32 bit or m64 for 64 bit version #add_definitions("-m32") #SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")