Compiling for 32-bit

I used to be able to follow the steps using CMake and VS to compile GLFW to 32-bit.
Now it seems that CMake generates a .sln file that is fixed at 64-bit.
Is there a straightforward way of compiling GLFW using CMake/VS, to 32-bit ?
Thanks!

You need to specify the generator and architecture for cmake to get either a 32bit or 64bit solution, although it is possible to by hand change a 32bit or 64bit project setup it’s a bit fiddly.

See the cmake documentation for the generator for the visual studio version you want to compile with:
https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html

1 Like

What @dougbinks said. Also, if you’re using the CMake GUI then you can choose in the Optional platform for generator drop down menu.

CMake used to default to 32-bit for Visual Studio but changed it to 64-bit for VS 2019.