Skip to content

Commit

Permalink
chore: fix cmake modules
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Sep 6, 2021
1 parent e60f93c commit 20d67a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/Modules/FindLibev.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# LIBEV_INCLUDE_DIR - The libev include directories
# LIBEV_LIBRARY - The libraries needed to use libev

find_path(LIBEV_INCLUDE_DIR ev.h PATH_SUFFIXES libev)
find_path(LIBEV_INCLUDE_DIR ev.h)
find_library(LIBEV_LIBRARY ev PATH_SUFFIXES lib64)

if(LIBEV_INCLUDE_DIR)
Expand Down
4 changes: 3 additions & 1 deletion cmake/Modules/FindLibuhttpd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
# LIBUHTTPD_INCLUDE_DIR - The libuhttpd include directories
# LIBUHTTPD_LIBRARY - The libraries needed to use libuhttpd

find_path(LIBUHTTPD_INCLUDE_DIR uhttpd)
find_path(LIBUHTTPD_INCLUDE_DIR uhttpd.h PATH_SUFFIXES include/uhttpd)
find_library(LIBUHTTPD_LIBRARY uhttpd PATH_SUFFIXES lib64)

string(REGEX REPLACE "uhttpd" "" LIBUHTTPD_INCLUDE_DIR "${LIBUHTTPD_INCLUDE_DIR}")

if(LIBUHTTPD_INCLUDE_DIR)
file(STRINGS "${LIBUHTTPD_INCLUDE_DIR}/uhttpd/config.h"
LIBUHTTPD_VERSION_MAJOR REGEX "^#define[ \t]+UHTTPD_VERSION_MAJOR[ \t]+[0-9]+")
Expand Down

0 comments on commit 20d67a4

Please sign in to comment.