FIND_PATH(osmpbf_INCLUDE_DIR osmpbf PATHS /usr/include /usr/local/include/ opt/local/include)
FIND_LIBRARY(osmpbf NAMES osmpbf PATHS /usr/lib /usr/local/lib /opt/local/lib)

IF (osmpbf_INCLUDE_DIR AND osmpbf)
   SET(osmpbf_LIBRARIES ${osmpbf})
   SET(osmpbf_FOUND TRUE)
ELSE (osmpbf_INCLUDE_DIR AND osmpbf)
   SET(osmpbf_LIBRARIES "NOTFOUND")
   SET(osmpbf_FOUND FALSE)
ENDIF(osmpbf_INCLUDE_DIR AND osmpbf)

IF (osmpbf_FOUND)
   IF (NOT osmpbf_FIND_QUIETLY)
      MESSAGE(STATUS "Found osmpbf: ${osmpbf_LIBRARIES}")
   ENDIF (NOT osmpbf_FIND_QUIETLY)
ELSE (osmpbf_FOUND)
   IF (osmpbf_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find osmpbf")
   ENDIF (osmpbf_FIND_REQUIRED)
ENDIF (osmpbf_FOUND)