Fixed build when tcmalloc is not found

This commit is contained in:
matlabbe
2018-07-30 15:27:03 -04:00
parent 98e605e3d1
commit 9943c28b88
3 changed files with 59 additions and 2 deletions
+9 -1
View File
@@ -24,6 +24,14 @@ SET(LIBRARIES
${OpenCV_LIBS}
)
if(Tcmalloc_FOUND)
SET(LIBRARIES
${LIBARIES}
${Tcmalloc_LIBRARIES}
)
endif(Tcmalloc_FOUND)
#include files
INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
@@ -156,4 +164,4 @@ ENDIF((APPLE AND BUILD_AS_BUNDLE) OR WIN32)
if(UNIX AND NOT APPLE)
set (CMAKE_CXX_FLAGS "-ltcmalloc")
ENDIF()
ENDIF()