FIND_PATH(DC1394_INCLUDE_DIR control.h
  /usr/local/include/dc1394
  /usr/include/dc1394
)

FIND_LIBRARY(DC1394_LIBRARY dc1394 /usr/local/lib /usr/lib)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DC1394 DEFAULT_MSG DC1394_INCLUDE_DIR DC1394_LIBRARY)
SET(DC1394_LIBRARIES ${DC1394_LIBRARY})

IF(APPLE)
  FIND_PACKAGE(IOKit)
  FIND_PACKAGE(CoreFoundation)
  FIND_PACKAGE(CoreServices)

  add_library(dc1394 STATIC IMPORTED)
  set_property(TARGET dc1394 PROPERTY IMPORTED_LOCATION /usr/local/lib/libdc1394.a)

  add_library(libusb STATIC IMPORTED)
  set_property(TARGET libusb PROPERTY IMPORTED_LOCATION /usr/local/lib/libusb-1.0.a)

  SET(DC1394_LIBRARIES
        dc1394
        libusb
         -lobjc
        ${IOKIT_LIBRARY} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY})

  set(DC1394_INCLUDE_DIRS ${DC1394_INCLUDE_DIR}/.. )
ENDIF(APPLE)
