Finding Gflags and Glog if they are installed with Macports. Fixing

problems finding Gperftools libraries
This commit is contained in:
Carles Fernandez 2014-05-11 14:50:57 +02:00
parent 872ed26527
commit 53b227a0c1
3 changed files with 9 additions and 9 deletions

View File

@ -416,10 +416,10 @@ endif(NOT GLOG_FOUND OR LOCAL_GFLAGS)
set(GCC_GPERFTOOLS_FLAGS "")
find_package(Gperftools)
if ( NOT GPERFTOOLS_FOUND )
message(STATUS "The optional library GPerftools has not been found.")
message(STATUS "The optional library GPerftools has not been found.")
else( NOT GPERFTOOLS_FOUND )
message (STATUS "GPerftools library found." )
link_libraries(profiler tcmalloc)
message (STATUS "GPerftools library found." )
link_libraries(${GPERFTOOLS_PROFILER} ${GPERFTOOLS_TCMALLOC})
endif( NOT GPERFTOOLS_FOUND )
list(APPEND CMAKE_CXX_FLAGS ${GCC_GPERFTOOLS_FLAGS})

View File

@ -21,6 +21,7 @@ else (WIN32)
FIND_PATH(GFlags_ROOT_DIR
libgflags.dylib
HINTS
/opt/local/lib
/usr/local/lib
)
endif (WIN32)
@ -45,6 +46,7 @@ IF(GFlags_ROOT_DIR)
FIND_PATH(GFlags_INCLUDE_DIRS
gflags/gflags.h
HINTS
/opt/local/include
/usr/local/include
${GFlags_ROOT_DIR}/src
)

View File

@ -23,12 +23,9 @@ endif(MSVC)
macro(_FIND_GLOG_LIBRARIES _var)
find_library(${_var}
NAMES
${ARGN}
PATHS
${LIB_PATHS}
PATH_SUFFIXES
lib
NAMES ${ARGN}
PATHS ${LIB_PATHS} /opt/local/lib
PATH_SUFFIXES lib
)
mark_as_advanced(${_var})
endmacro()
@ -53,6 +50,7 @@ else(MSVC)
find_path(GLOG_INCLUDE_DIR NAMES raw_logging.h
PATHS
${GLOG_ROOT}/include/glog
/opt/local/include/glog # default location in Macports
)
endif(MSVC)