Look for shlwapi.h also in case of MinGW.
authorAndreas Schuh <andreas.schuh.84@gmail.com>
Wed, 19 Mar 2014 17:15:36 +0000 (17:15 +0000)
committerAndreas Schuh <andreas.schuh.84@gmail.com>
Wed, 19 Mar 2014 17:15:36 +0000 (17:15 +0000)
CMakeLists.txt [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index ae24799..fa456ea
@@ -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)")