Improve cmake Modules: Compatible with CentOS x64

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
main
Jianhui Zhao 2017-11-13 16:11:49 +08:00
parent 383f325547
commit 93b23500da
2 changed files with 6 additions and 14 deletions

View File

@ -4,12 +4,8 @@
# HTTPPARSER_INCLUDE_DIRS - The http-parser include directories
# HTTPPARSER_LIBRARIES - The libraries needed to use http-parser
find_path(HTTPPARSER_INCLUDE_DIR
NAMES http_parser.h
)
find_library(HTTPPARSER_LIBRARY
NAMES http_parser
)
find_path(HTTPPARSER_INCLUDE_DIR http_parser.h)
find_library(HTTPPARSER_LIBRARY http_parser PATH_SUFFIXES lib64)
if(HTTPPARSER_INCLUDE_DIR)
file(STRINGS "${HTTPPARSER_INCLUDE_DIR}/http_parser.h"
@ -35,4 +31,4 @@ if(HTTPPARSER_FOUND)
set(HTTPPARSER_INCLUDE_DIRS ${HTTPPARSER_INCLUDE_DIR})
endif()
mark_as_advanced(HTTPPARSER_INCLUDE_DIR HTTPPARSER_LIBRARY)
mark_as_advanced(HTTPPARSER_INCLUDE_DIR HTTPPARSER_LIBRARY)

View File

@ -4,12 +4,8 @@
# LIBEV_INCLUDE_DIRS - The libev include directories
# LIBEV_LIBRARIES - The libraries needed to use libev
find_path(LIBEV_INCLUDE_DIR
NAMES ev.h
)
find_library(LIBEV_LIBRARY
NAMES ev
)
find_path(LIBEV_INCLUDE_DIR ev.h)
find_library(LIBEV_LIBRARY ev PATH_SUFFIXES lib64)
if(LIBEV_INCLUDE_DIR)
file(STRINGS "${LIBEV_INCLUDE_DIR}/ev.h"
@ -35,4 +31,4 @@ if(LIBEV_FOUND)
set(LIBEV_INCLUDE_DIRS ${LIBEV_INCLUDE_DIR})
endif()
mark_as_advanced(LIBEV_INCLUDE_DIR LIBEV_LIBRARY)
mark_as_advanced(LIBEV_INCLUDE_DIR LIBEV_LIBRARY)