msys: look in msys' directory for files

This tells find_path and find_library to look under this directory first
which is what we want on msys2.
This commit is contained in:
Ben Boeckel 2014-11-17 18:09:21 -05:00
parent d855fe4e89
commit 475154255a

View file

@ -95,6 +95,11 @@ else()
endif() endif()
option(STATIC "Link libraries statically" ${DEFAULT_STATIC}) option(STATIC "Link libraries statically" ${DEFAULT_STATIC})
if(MINGW)
get_filename_component(msys2_install_path "[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MSYS2 64bit;InstallLocation]" ABSOLUTE)
set(CMAKE_INCLUDE_PATH "${msys2_install_path}/mingw64/include")
endif()
if(STATIC) if(STATIC)
if(MSVC) if(MSVC)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll.a .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll.a .a ${CMAKE_FIND_LIBRARY_SUFFIXES})