Freebsd: fix external tcmalloc link (#452)

This commit is contained in:
proller 2017-02-03 18:19:12 +03:00 committed by GitHub
parent d452f8dcd7
commit 84e4fb00bd

View File

@ -6,6 +6,13 @@ if (ENABLE_LIBTCMALLOC)
else () else ()
find_package (Gperftools REQUIRED) find_package (Gperftools REQUIRED)
include_directories (${GPERFTOOLS_INCLUDE_DIR}) include_directories (${GPERFTOOLS_INCLUDE_DIR})
if (CMAKE_SYSTEM MATCHES "FreeBSD")
find_library (UNWIND_LIBRARY unwind)
find_library (LZMA_LIBRARY lzma)
list (APPEND GPERFTOOLS_TCMALLOC ${UNWIND_LIBRARY} ${LZMA_LIBRARY})
endif ()
endif () endif ()
if (GPERFTOOLS_INCLUDE_DIR AND GPERFTOOLS_TCMALLOC) if (GPERFTOOLS_INCLUDE_DIR AND GPERFTOOLS_TCMALLOC)