Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Cmake does not yield a x86 compatible Visual Studio solution.  (Read 1497 times)

0 Members and 1 Guest are viewing this topic.

Martin Lefevre

  • Newbie
  • *
  • Posts: 6
    • View Profile
 Hi,

I was trying to compile a static version of SFML with CMake for Visual Studio 2019, I think I followed the tutorial (https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php) correctly. The problem is that once I open the CMake generated solution to finally build SFML, I see that I cannot switch the solution configuration to x86, thus preventing me to build SFML in 32-bits.

Here are all the steps I did to compile SFML with CMake:

Firstly, I downloaded the SFML source code,
then, I opened CMake, chose the SFML file as source code and a build folder to put built files into.
Then, I clicked on configure, chose Visual studio 16 2019 as generator, and clicked on finish.
Once the configuring done, I unchecked BUILD_SHARED_LIBS, checked SFML_USE_STATIC_STD_LIBS, clicked on configure, then generate. Once everything is done, I clicked on the Open_Project button which opens the generated Visual Studio solution.

And there is the issue: I cannot switch the project's configuration to something else than x64...

What did I do wrong?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Cmake does not yield a x86 compatible Visual Studio solution.
« Reply #1 on: March 30, 2020, 01:40:28 pm »
CMake changed their generator setup in some more recent updates.
When you pick a generator, you also need to pick the platform if you don't want x64.

Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Martin Lefevre

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Cmake does not yield a x86 compatible Visual Studio solution.
« Reply #2 on: March 30, 2020, 02:20:29 pm »
Oh, that was simple... thanks!