From 6a18ff3424c3c9b1fd780b95838a7438a52ab8b1 Mon Sep 17 00:00:00 2001 From: Richard Pastrick Date: Mon, 27 Apr 2020 16:43:13 -0700 Subject: [PATCH] Fix HAVE_DIRENT_H test During the first stream, Jason hacked around the fact that check_include_file only works for C and not C++. This is the real fix for this issue. --- CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b101304ba9..78dc354b12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,13 +48,10 @@ endif() find_package(m) include(CheckSymbolExists) -include(CheckIncludeFile) +include(CheckIncludeFileCXX) check_symbol_exists(strcasecmp "strings.h" HAVE_DECL_STRCASECMP) check_symbol_exists(strncasecmp "strings.h" HAVE_DECL_STRNCASECMP) -#check_include_file("dirent.h" HAVE_DIRENT_H) - -set(HAVE_DIRENT_H True) - +check_include_file_cxx("dirent.h" HAVE_DIRENT_H) string(CONCAT WINDOWS_RC_VERSION "${PROJECT_VERSION_MAJOR}, " "${PROJECT_VERSION_MINOR}, ${PROJECT_VERSION_PATCH}, 0")