# -*- cmake -*-
# - Find BitcoinApiCpp
# Find the BitcoinApiCpp includes and library
# This module defines
#  BITCOINAPICPP_INCLUDE_DIRS, where to find bitcoinapi.h
#  BITCOINAPICPP_LIBRARIES, the libraries needed to use BitcoinApiCpp.

FIND_PATH(BITCOINAPICPP_INCLUDE_DIRS
NAMES bitcoinapi/bitcoinapi.h
PATHS /usr/include /usr/local/include
)

FIND_LIBRARY(BITCOINAPICPP_LIBRARIES
NAMES bitcoinapi
PATHS /usr/lib /usr/local/lib
)

IF (BITCOINAPICPP_LIBRARIES AND BITCOINAPICPP_INCLUDE_DIRS)
    SET(BITCOINAPICPP_LIBRARIES ${BITCOINAPICPP_LIBRARIES})
    SET(BITCOINAPICPP_FOUND "YES")
ELSE (BITCOINAPICPP_LIBRARIES AND BITCOINAPICPP_INCLUDE_DIRS)
  SET(BITCOINAPICPP_FOUND "NO")
ENDIF (BITCOINAPICPP_LIBRARIES AND BITCOINAPICPP_INCLUDE_DIRS)


IF (BITCOINAPICPP_FOUND)
   IF (NOT BITCOINAPICPP_FIND_QUIETLY)
      MESSAGE(STATUS "Found BitcoinApiCpp: ${BITCOINAPICPP_LIBRARIES}")
   ENDIF (NOT BITCOINAPICPP_FIND_QUIETLY)
ELSE (BITCOINAPICPP_FOUND)
   IF (BITCOINAPICPP_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find BITCOINAPICPP library include: ${BITCOINAPICPP_INCLUDE_DIRS}, lib: ${BITCOINAPICPP_LIBRARIES}")
   ENDIF (BITCOINAPICPP_FIND_REQUIRED)
ENDIF (BITCOINAPICPP_FOUND)

MARK_AS_ADVANCED(
  BITCOINAPICPP_LIBRARIES
  BITCOINAPICPP_INCLUDE_DIRS
  )

