From 9242578bc18a220c41ce07e024d620465ec9e434 Mon Sep 17 00:00:00 2001 From: Andreas Schuh Date: Wed, 19 Mar 2014 17:15:36 +0000 Subject: [PATCH] Look for shlwapi.h also in case of MinGW. --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100644 new mode 100755 index ae24799..fa456ea --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,11 +82,11 @@ if (MSVC) set (HAVE_INTTYPES_H 0) set (HAVE_UNISTD_H 0) set (HAVE_SYS_STAT_H 1) - check_include_file_cxx ("shlwapi.h" HAVE_SHLWAPI_H) + set (HAVE_SHLWAPI_H 1) else () foreach (fname IN ITEMS unistd stdint inttypes sys/types sys/stat fnmatch) string (TOUPPER "${fname}" FNAME) - string (REGEX REPLACE "/" "_" FNAME "${FNAME}") + string (REPLACE "/" "_" FNAME "${FNAME}") if (NOT HAVE_${FNAME}_H) check_include_file_cxx ("${fname}.h" HAVE_${FNAME}_H) endif () @@ -95,6 +95,9 @@ else () bool_to_int (HAVE_STDINT_H) bool_to_int (HAVE_SYS_TYPES_H) bool_to_int (HAVE_INTTYPES_H) + if (NOT HAVE_FNMATCH_H AND OS_WINDOWS) + check_include_file_cxx ("shlwapi.h" HAVE_SHLWAPI_H) + endif () endif () set (GFLAGS_INTTYPES_FORMAT "" CACHE STRING "Format of integer types: \"C99\" (uint32_t), \"BSD\" (u_int32_t), \"VC7\" (__int32)") -- 2.7.4