mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-30 21:25:06 +00:00
fix(cmake): fixed jemalloc from system.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
parent
1c71777dbd
commit
5044f3aa7e
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user