From 732e00ea63a12d163c9aa7d25c5ce478eee422a2 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Thu, 10 Oct 2019 17:28:38 +0800 Subject: [PATCH] =?UTF-8?q?release=E7=89=88=E6=9C=AC=E6=B7=BB=E5=8A=A0jema?= =?UTF-8?q?lloc=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61baf74a..f90e5cd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,15 @@ if(ENABLE_MP4RECORD) endif(WIN32) endif() +if(${CMAKE_BUILD_TYPE} MATCHES "Release") + #查找jemalloc是否安装 + find_package(JEMALLOC QUIET) + if(JEMALLOC_FOUND) + message(STATUS "found library:\"${JEMALLOC_LIBRARIES}\"") + include_directories(${JEMALLOC_INCLUDE_DIR}) + list(APPEND LINK_LIB_LIST ${JEMALLOC_LIBRARIES}) + endif() +endif() if (WIN32) list(APPEND LINK_LIB_LIST WS2_32 Iphlpapi shlwapi)