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

Author Topic: BUG - FindSFML.cmake prioritizes lib64 over lib in Windows, 64 bits  (Read 858 times)

0 Members and 1 Guest are viewing this topic.

jackcmedia

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

I'm still toying with the idea of generating one script for on-demand generation of 32/64 bit binaries and I've found the reason why it was not finding or linking to the wrong libraries (apart from having to regenerate CMakeCache.txt between compilations).

As it turns out, FindSFML.cmake has preference for the "lib64" subfolder. As the FindSFML.cmake files are now (checked 2.1 and 2.2), they will try to link to the 64 bit libraries located in the "lib64" subfolder, even if the global property FIND_LIBRARY_USE_LIB64_PATHS is turned off.

The global property mentioned before gives precedence to "lib64" subfolders and it is logical that, when it is turned off, it won't check "lib64" first. Moreover, it only applies to 64-bit systems, rendering it a completely harmless statement on 32-bit systems.

Therefore, I would like to suggest that, in the FindSFML.cmake files, the PATH_SUFFIXES option are changed to PATH_SUFFIXES lib, then use the global property previously mentioned.