1# - Try to find the RRDtool library 2# Once done this will define: 3# 4# RRDTOOL_FOUND - system has the RRDtool library 5# RRDTOOL_INCLUDE_DIR - the RRDtool include directory 6# RRDTOOL_LIBRARIES - The libraries needed to use RRDtool 7# 8# Copyright (c) 2008, Benjamin Reed <ranger@opennms.org> 9# 10# Redistribution and use is allowed according to the terms of the BSD license. 11 12FIND_PATH(RRDTOOL_INCLUDE_DIR rrd.h) 13FIND_LIBRARY(RRDTOOL_LIBRARY NAMES rrd_th rrd) 14 15if(RRDTOOL_LIBRARY AND RRDTOOL_INCLUDE_DIR) 16 set(RRDTOOL_FOUND true) 17 set(RRDTOOL_LIBRARIES ${RRDTOOL_LIBRARY} CACHE STRING "The libraries needed to use RRDTOOL") 18endif(RRDTOOL_LIBRARY AND RRDTOOL_INCLUDE_DIR) 19 20if (NOT RRDTOOL_FOUND) 21 if (Rrdtool_FIND_REQUIRED) 22 message(FATAL_ERROR "Could NOT find rrdtool") 23 endif (Rrdtool_FIND_REQUIRED) 24endif (NOT RRDTOOL_FOUND) 25 26MARK_AS_ADVANCED(RRDTOOL_INCLUDE_DIR RRDTOOL_LIBRARIES RRDTOOL_LIBRARY) 27