Commit 6b5f2567 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

modified Findtcmalloc.cmake to propagate the library path

The tcmalloc package is special, because we do not link against the
library, but we need the LD_LIBRARY_PATH set to find it anyway.
parent c0521579
......@@ -7,6 +7,7 @@
# TCMALLOC_tcmalloc_LIBRARY
# TCMALLOC_profiler_LIBRARY
# TCMALLOC_LIBRARIES (not cached)
# TCMALLOC_LIBRARY_DIRS (not cached)
find_path(TCMALLOC_INCLUDE_DIR google/tcmalloc.h)
foreach(component tcmalloc profiler)
......@@ -22,3 +23,9 @@ INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(tcmalloc DEFAULT_MSG TCMALLOC_INCLUDE_DIR TCMALLOC_LIBRARIES)
mark_as_advanced(TCMALLOC_FOUND TCMALLOC_INCLUDE_DIR TCMALLOC_LIBRARIES)
if(TCMALLOC_tcmalloc_LIBRARY)
get_filename_component(TCMALLOC_LIBRARY_DIRS ${TCMALLOC_tcmalloc_LIBRARY} PATH)
elseif(TCMALLOC_profiler_LIBRARY)
get_filename_component(TCMALLOC_LIBRARY_DIRS ${TCMALLOC_profiler_LIBRARY} PATH)
endif()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment