From 93b23500dace48e510e3377d6f33216ebaded671 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Mon, 13 Nov 2017 16:11:49 +0800 Subject: [PATCH] Improve cmake Modules: Compatible with CentOS x64 Signed-off-by: Jianhui Zhao --- cmake/Modules/FindHttpParser.cmake | 10 +++------- cmake/Modules/FindLibev.cmake | 10 +++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/cmake/Modules/FindHttpParser.cmake b/cmake/Modules/FindHttpParser.cmake index 4c285bf..6084d4b 100755 --- a/cmake/Modules/FindHttpParser.cmake +++ b/cmake/Modules/FindHttpParser.cmake @@ -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) \ No newline at end of file +mark_as_advanced(HTTPPARSER_INCLUDE_DIR HTTPPARSER_LIBRARY) diff --git a/cmake/Modules/FindLibev.cmake b/cmake/Modules/FindLibev.cmake index 1fbefa8..71d9aad 100755 --- a/cmake/Modules/FindLibev.cmake +++ b/cmake/Modules/FindLibev.cmake @@ -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) \ No newline at end of file +mark_as_advanced(LIBEV_INCLUDE_DIR LIBEV_LIBRARY)