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.

FindThirdPartyEemagineEEGO.cmake 1.5KB

3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. GET_PROPERTY(OV_PRINTED GLOBAL PROPERTY OV_TRIED_ThirdPartyEemagineEEGO)
  2. # ---------------------------------
  3. # Finds the Eemagine EEGO API & library
  4. # Adds library to target
  5. # Adds include path
  6. # ---------------------------------
  7. if (WIN32)
  8. FIND_PATH(PATH_EEGOAPI amplifier.h PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES sdk_eemagine_eego/eemagine/sdk/)
  9. else()
  10. FIND_PATH(PATH_EEGOAPI amplifier.h PATHS /usr/include PATH_SUFFIXES eemagine/sdk/)
  11. endif(WIN32)
  12. IF(NOT PATH_EEGOAPI)
  13. OV_PRINT(OV_PRINTED " FAILED to find EEGO API (optional driver) - cmake looked in '${LIST_DEPENDENCIES_PATH}', skipping EEGO.")
  14. RETURN()
  15. ENDIF(NOT PATH_EEGOAPI)
  16. OV_PRINT(OV_PRINTED " Found EEGO API in ${PATH_EEGOAPI}...")
  17. if (WIN32)
  18. FIND_FILE(LIB_EEGOAPI NAMES eego-SDK.dll PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES sdk_eemagine_eego/eemagine/bin/)
  19. else()
  20. find_library(LIB_EEGOAPI NAMES eego-SDK)
  21. target_link_libraries(${PROJECT_NAME} -ldl)
  22. OV_PRINT(OV_PRINTED " LIB_EEGOAPI : ${LIB_EEGOAPI}")
  23. endif(WIN32)
  24. IF(NOT LIB_EEGOAPI)
  25. OV_PRINT(OV_PRINTED " [FAILED] EEGO lib not found under '${LIST_DEPENDENCIES_PATH}', skipping EEGO.")
  26. RETURN()
  27. ENDIF(NOT LIB_EEGOAPI)
  28. INCLUDE_DIRECTORIES("${PATH_EEGOAPI}/../../")
  29. INSTALL(PROGRAMS "${LIB_EEGOAPI}" DESTINATION ${DIST_BINDIR})
  30. ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyEEGOAPI)
  31. ADD_DEFINITIONS(-DEEGO_SDK_BIND_DYNAMIC)
  32. OV_PRINT(OV_PRINTED " [ OK ] lib ${LIB_EEGOAPI}")
  33. SET_PROPERTY(GLOBAL PROPERTY OV_TRIED_ThirdPartyEemagineEEGO "Yes")