[CMake] CMake on 64-bit Visual Studio

Peter Hull peterhull90 at gmail.com
Mon Oct 19 06:01:53 EDT 2015


I have been trying to compile the Allegro library (http://liballeg.org/) on
Windows 64-bit using Visual Studio 2015.
I am running into a problem where CMake 3.3.2 doesn't correctly locate the
64-bit version of gdiplus.lib.

I've got a minimal example:
====
cmake_minimum_required(VERSION 3.3)
find_library(GDIP gdiplus)
----
I am using the -A x64 flag to CMake to select a 64 bit build, but CMake
still finds the 32-bit library in C:/Program Files (x86)/Windows
Kits/8.1/Lib/winv6.3/um/x86/gdiplus.lib rather than the 64 bit version in
C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/x64/gdiplus.lib

I believe the path patterns that find_library uses do not match the paths
that Microsoft has chosen to put the files into - for example if it was
C:/Program Files (x86)/Windows Kits/8.1/winv6.3/um/Lib/x64/gdiplus.lib it
could be made to work.

Is there a way to get around this?

Thanks,
Peter


(also posted on stackoverflow,
http://stackoverflow.com/questions/33124745/cmake-finding-32bit-gdi-on-64-bit-platform)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20151019/ee0857e8/attachment.html>


More information about the CMake mailing list