Skip to content

Commit

Permalink
BUILD: Set the VS build platform in CMake if the 32bit flag is set.
Browse files Browse the repository at this point in the history
  • Loading branch information
51DCI authored and ben51degrees committed May 18, 2023
1 parent 37fae72 commit b8ae17a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b8ae17a

Please sign in to comment.