[CMake] Windows 7 64 bits, C++ third party libraries and FIND_LIBRARY_USE_LIB64_PATHS

Jack jackcmedia at gmail.com
Thu Dec 11 08:16:53 EST 2014


Greetings,

I am a neophyte in CMake and I am trying to set up a CMakeLists.txt file to
compile a project I was working on, which uses a third party library called
SFML 2.1.

My compilation environment is as follows:

   - Windows 7 , 64 bits
   - CLion EAP, which uses:
   - TDM-GCC's MinGW-w64 4.9.2 (which can generate both 32 and 64 bits
      binaries)
      - CMake 3.0.2

And SFML 2.1 is located on a folder which contains the following subfolders:

   - bin (dlls for x86)
   - bin64 (dlls for x64)
   - include
   - lib (libraries for x86)
   - lib64 (libraries for x64)

A FindSFML.cmake script, which was provided by the SFML development team,
looks for the libs in the usual places (on *nix OSes) and, for Windows
OSes, it uses a CMake or an environmental variable that points to the base
folder.

Now, here comes my main dilemma. CMake is able to locate the libraries to
generate 32 bit binaries. However, the FIND_LIBRARY_USE_LIB64_PATHS global
parameter, when set to ON or TRUE, doesn't seem to allow CMake to locate
the 64 bit libraries on the "lib64" folder, which means that, whenever I
want to generate binaries for another architecture, I have to go around
renaming folders.

Of course, it could be that I'm simply doing this the wrong way and I
should have only the 64 bit libraries on my system, then use another
computer or VM to generate 32 bit binaries.

Does anyone know if the global property FIND_LIBRARY_USE_LIB64_PATHS has
ever worked on Windows? Should it or not?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141211/939144cf/attachment.html>


More information about the CMake mailing list