mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2024-12-22 22:16:38 +08:00
add zlib check
This commit is contained in:
parent
f71f253808
commit
0977f2f946
@ -4,6 +4,20 @@ option(TARS_SSL "option for ssl" OFF)
|
||||
option(TARS_HTTP2 "option for http2" OFF)
|
||||
option(TARS_PROTOBUF "option for protocol" OFF)
|
||||
|
||||
IF(UNIX)
|
||||
FIND_PACKAGE(ZLIB)
|
||||
IF(NOT ZLIB_FOUND)
|
||||
SET(ERRORMSG "zlib library not found. Please install appropriate package,
|
||||
remove CMakeCache.txt and rerun cmake.")
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
SET(ERRORMSG ${ERRORMSG}
|
||||
"On Debian/Ubuntu, package name is zlib1g-dev(apt-get install zlib1g-dev), on Redhat/Centos and derivates "
|
||||
"it is zlib-devel (yum install zlib-devel).")
|
||||
ENDIF()
|
||||
MESSAGE(FATAL_ERROR ${ERRORMSG})
|
||||
ENDIF()
|
||||
ENDIF(UNIX)
|
||||
|
||||
if (TARS_MYSQL)
|
||||
add_definitions(-DTARS_MYSQL=1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user