You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FindThirdPartyNeuroServoDeps.cmake 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # ---------------------------------
  2. # Finds third party libs for NeuroServo driver
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. GET_PROPERTY(OV_PRINTED GLOBAL PROPERTY OV_TRIED_ThirdPartyNeuroServoDeps)
  7. IF(WIN32)
  8. FIND_LIBRARY(LIB_STANDARD_MODULE_HID hid)
  9. FIND_LIBRARY(LIB_STANDARD_MODULE_SETUPAPI SetupApi)
  10. IF(LIB_STANDARD_MODULE_HID AND LIB_STANDARD_MODULE_SETUPAPI)
  11. OV_PRINT(OV_PRINTED " Found NeuroServo driver dependencies ...")
  12. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_STANDARD_MODULE_HID})
  13. TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_STANDARD_MODULE_SETUPAPI})
  14. ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyNeuroServo)
  15. ELSE(LIB_STANDARD_MODULE_HID AND LIB_STANDARD_MODULE_SETUPAPI)
  16. OV_PRINT(OV_PRINTED " FAILED to find NeuroServo HID driver dependencies (optional driver) ...")
  17. ENDIF(LIB_STANDARD_MODULE_HID AND LIB_STANDARD_MODULE_SETUPAPI)
  18. IF(LIB_STANDARD_MODULE_HID)
  19. OV_PRINT(OV_PRINTED " [ OK ] HID library ${LIB_STANDARD_MODULE_HID}...")
  20. ELSE(LIB_STANDARD_MODULE_HID)
  21. OV_PRINT(OV_PRINTED " [FAILED] to find HID library...")
  22. ENDIF(LIB_STANDARD_MODULE_HID)
  23. IF(LIB_STANDARD_MODULE_SETUPAPI)
  24. OV_PRINT(OV_PRINTED " [ OK ] SetupApi library ${LIB_STANDARD_MODULE_SETUPAPI}...")
  25. ELSE(LIB_STANDARD_MODULE_SETUPAPI)
  26. OV_PRINT(OV_PRINTED " [FAILED] to find SetupApi library...")
  27. ENDIF(LIB_STANDARD_MODULE_SETUPAPI)
  28. ENDIF(WIN32)
  29. SET_PROPERTY(GLOBAL PROPERTY OV_TRIED_ThirdPartyNeuroServoDeps "Yes")