diff --git a/cmake/modules/jemalloc.cmake b/cmake/modules/jemalloc.cmake index 3f80ac7556f..bd9d1b11bf7 100644 --- a/cmake/modules/jemalloc.cmake +++ b/cmake/modules/jemalloc.cmake @@ -19,14 +19,15 @@ if(JEMALLOC_INCLUDE) # we already have JEMALLOC elseif(NOT USE_BUNDLED_JEMALLOC) find_path(JEMALLOC_INCLUDE jemalloc/jemalloc.h) + set(JEMALLOC_INCLUDE ${JEMALLOC_INCLUDE}/jemalloc) if(BUILD_SHARED_LIBS) set(JEMALLOC_LIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) else() set(JEMALLOC_LIB_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX}) endif() - find_library(JEMALLOC_LIB NAMES jemalloc${JEMALLOC_LIB_SUFFIX}) + find_library(JEMALLOC_LIB NAMES libjemalloc${JEMALLOC_LIB_SUFFIX}) if(JEMALLOC_LIB) - message(STATUS "Found JEMALLOC: lib: ${JEMALLOC_LIB}") + message(STATUS "Found JEMALLOC: include: ${JEMALLOC_INCLUDE}, lib: ${JEMALLOC_LIB}") else() message(FATAL_ERROR "Couldn't find system jemalloc") endif()