otherwise it's always true, even if the libaries are not found. also
the cmake output will be wrong without this change:
without this change, it is:
-- Found gperftools: GPERFTOOLS_TCMALLOC_LIBRARY;GPERFTOOLS_TCMALLOC_MINIMAL_LIBRARY;GPERFTOOLS_PROFILER_LIBRARY (found version "2.5.93")
with this change, it would be:
-- Found gperftools: /tmp/gperf/lib/libtcmalloc.so (found version "2.5.93")
Signed-off-by: Kefu Chai <kchai@redhat.com>
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(gperftools
- REQUIRED_VARS GPERFTOOLS_LIBRARIES GPERFTOOLS_INCLUDE_DIR
+ REQUIRED_VARS ${GPERFTOOLS_LIBRARIES} GPERFTOOLS_INCLUDE_DIR
VERSION_VAR TCMALLOC_VERSION_STRING)
-mark_as_advanced(GPERFTOOLS_LIBRARIES GPERFTOOLS_INCLUDE_DIR)
+mark_as_advanced(${GPERFTOOLS_LIBRARIES} GPERFTOOLS_INCLUDE_DIR)