aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-11-17 18:09:21 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2014-11-17 18:19:53 -0500
commit475154255ace3212087b9b3492c1cd8e51bfde61 (patch)
tree8b6e1ec855b8e5f8c6428464260239a960211220 /CMakeLists.txt
parentminiupnpc: bump the _POSIX_C_SOURCE feature macro (diff)
downloadmonero-475154255ace3212087b9b3492c1cd8e51bfde61.tar.xz
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75b7bf60f..b8bc83a07 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -95,6 +95,11 @@ else()
endif()
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(MSVC)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll.a .a ${CMAKE_FIND_LIBRARY_SUFFIXES})