detect_dc1394.cmake 823 B

12345678910111213141516171819202122232425262728
  1. # --- Dc1394 ---
  2. if(NOT HAVE_DC1394_2 AND PKG_CONFIG_FOUND)
  3. ocv_check_modules(DC1394_2 libdc1394-2)
  4. if(DC1394_2_FOUND)
  5. set(HAVE_DC1394_2 TRUE)
  6. endif()
  7. endif()
  8. if(NOT HAVE_DC1394_2)
  9. find_path(DC1394_INCLUDE "dc1394/dc1394.h"
  10. PATHS "${DC1394_ROOT}" ENV DC1394_ROOT
  11. PATH_SUFFIXES "include"
  12. NO_DEFAULT_PATH)
  13. find_library(DC1394_LIBRARY "dc1394"
  14. PATHS "${DC1394_ROOT}" ENV DC1394_ROOT
  15. PATH_SUFFIXES "lib"
  16. NO_DEFAULT_PATH)
  17. if(DC1394_INCLUDE AND DC1394_LIBRARY)
  18. set(HAVE_DC1394_2 TRUE)
  19. set(DC1394_2_INCLUDE_DIRS "${DC1394_INCLUDE}")
  20. set(DC1394_2_LIBRARIES "${DC1394_LIBRARY}")
  21. set(DC1394_2_VERSION "unknown") # informational
  22. endif()
  23. endif()
  24. if(HAVE_DC1394_2)
  25. ocv_add_external_target(dc1394_2 "${DC1394_2_INCLUDE_DIRS}" "${DC1394_2_LIBRARIES}" "HAVE_DC1394_2")
  26. endif()