2015-10-19 13:01 GMT+03:00 Peter Hull <peterhul...@gmail.com>: > > 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?
One idea, how I've created workaround it for odbc lib: Remove find_library(GDIPLUS_LIBRARY NAMES libgdiplus gdiplus) from here https://github.com/liballeg/allegro5/blob/5.1/cmake/FindGDIPLUS.cmake#L20 And set(GDIPLUS_LIBRARY gdiplus) or another proper name. Visual studio will pick it from proper path depending on target x86 or x86_64. > > Thanks, > Peter > > > (also posted on stackoverflow, > http://stackoverflow.com/questions/33124745/cmake-finding-32bit-gdi-on-64-bit-platform) > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake -- Best Regards, Sergei Nikulov -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake