mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
添加jemalloc支持
This commit is contained in:
parent
8c50aa6c66
commit
ddd4f57fe8
@ -87,7 +87,7 @@ if(ZLTOOLKIT_FOUND)
|
|||||||
list(APPEND LINK_LIB_LIST ${ZLTOOLKIT_LIBRARIES})
|
list(APPEND LINK_LIB_LIST ${ZLTOOLKIT_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#查找ZLToolKit是否安装
|
#查找JEMALLOC是否安装
|
||||||
find_package(JEMALLOC QUIET)
|
find_package(JEMALLOC QUIET)
|
||||||
if(JEMALLOC_FOUND)
|
if(JEMALLOC_FOUND)
|
||||||
message(STATUS "找到JEMALLOC库:\"${JEMALLOC_INCLUDE_DIR}\"")
|
message(STATUS "找到JEMALLOC库:\"${JEMALLOC_INCLUDE_DIR}\"")
|
||||||
|
16
cmake/FindJEMALLOC.cmake
Normal file
16
cmake/FindJEMALLOC.cmake
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
|
||||||
|
find_path(JEMALLOC_INCLUDE_DIR
|
||||||
|
NAMES jemalloc/jemalloc.h
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(JEMALLOC_LIBRARY
|
||||||
|
NAMES jemalloc
|
||||||
|
)
|
||||||
|
|
||||||
|
set(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
|
||||||
|
set(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(JEMALLOC DEFAULT_MSG JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
|
Loading…
Reference in New Issue
Block a user