diff --git a/CMakeLists.txt b/CMakeLists.txt index 35e25f1c..9bdf7851 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,10 +53,14 @@ option(MemoryOnly "MemoryOnly" OFF) option(NoThreading "NoThreading" OFF) option(ExceptionsDisabled "ExceptionsDisabled" OFF) -if (32bit AND NOT MSVC AND NOT IS_ARM) +if (32bit AND NOT IS_ARM) message("-- 32 bit compilation") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") + if (NOT MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") + else() + set(CMAKE_VS_PLATFORM_NAME "Win32") + endif() endif() if (NOT MSVC AND NOT APPLE)