detect_pvapi.cmake 518 B

123456789101112131415161718192021
  1. # --- PvApi ---
  2. if(NOT HAVE_PVAPI)
  3. if(X86_64)
  4. set(arch x64)
  5. else()
  6. set(arch x86)
  7. endif()
  8. find_path(PVAPI_INCLUDE "PvApi.h"
  9. PATHS "${PVAPI_ROOT}" ENV PVAPI_ROOT
  10. PATH_SUFFIXES "inc-pc")
  11. find_library(PVAPI_LIBRARY "PvAPI"
  12. PATHS "${PVAPI_ROOT}" ENV PVAPI_ROOT
  13. PATH_SUFFIXES "bin-pc/${arch}/${gcc}")
  14. if(PVAPI_INCLUDE AND PVAPI_LIBRARY)
  15. set(HAVE_PVAPI TRUE)
  16. endif()
  17. endif()
  18. if(HAVE_PVAPI)
  19. ocv_add_external_target(pvapi "${PVAPI_INCLUDE}" "${PVAPI_LIBRARY}" "HAVE_PVAPI")
  20. endif()