foxygit / doom Log in
commit 360da28234c5aef0690a115fcf625e06d95470d2
Author:     Alex Mayfield <alexmax2742@gmail.com>
AuthorDate: Sun Jun 3 10:50:32 2018 -0400
Commit:     Alex Mayfield <alexmax2742@gmail.com>
CommitDate: Sun Jun 3 10:50:55 2018 -0400

    Fix strcasecmp detection

    Our detection must include strings.h.
---
 CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cd026453..714b8f3b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,9 +46,9 @@ endif()

 find_package(m)

-include(CheckFunctionExists)
-check_function_exists(strcasecmp HAVE_DECL_STRCASECMP)
-check_function_exists(strncasecmp HAVE_DECL_STRNCASECMP)
+include(CheckSymbolExists)
+check_symbol_exists(strcasecmp "strings.h" HAVE_DECL_STRCASECMP)
+check_symbol_exists(strncasecmp "strings.h" HAVE_DECL_STRNCASECMP)

 set(WINDOWS_RC_VERSION "${PROJECT_VERSION_MAJOR}, ${PROJECT_VERSION_MINOR}, ${PROJECT_VERSION_PATCH}, 0")