use mimalloc

This commit is contained in:
andrew (from workstation) 2020-01-05 18:31:14 +01:00
parent 1cea329368
commit faa0794f9e

View File

@ -145,6 +145,7 @@ endif()
set(CMAKE_THREAD_PREFER_PTHREAD ON)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
find_package(mimalloc 1.0 REQUIRED)
if (THREADS_HAVE_PTHREAD_ARG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
@ -758,7 +759,9 @@ target_include_directories(tdclient PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${TL_TD_AUTO_INCLUDES}>
)
target_link_libraries(tdclient PRIVATE tdcore)
target_link_libraries(tdclient PUBLIC mimalloc)
if (TD_ENABLE_JNI AND NOT ANDROID) # jni is available by default on Android
target_include_directories(tdclient PUBLIC ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})