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.

FindOpenViBE.cmake 918B

123456789101112131415161718192021222324252627282930313233
  1. # ---------------------------------
  2. # Finds OpenViBE
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. OPTION(DYNAMIC_LINK_OPENVIBE "Dynamically link OpenViBE" ON)
  7. IF(DYNAMIC_LINK_OPENVIBE)
  8. ADD_DEFINITIONS(-DOV_Shared)
  9. ENDIF(DYNAMIC_LINK_OPENVIBE)
  10. IF(DYNAMIC_LINK_OPENVIBE)
  11. SET(OPENVIBE_LINKING "")
  12. ELSE(DYNAMIC_LINK_OPENVIBE)
  13. SET(OPENVIBE_LINKING "-static")
  14. ENDIF(DYNAMIC_LINK_OPENVIBE)
  15. set(SRC_DIR ${OV_BASE_DIR}/openvibe)
  16. SET(PATH_OPENVIBE "PATH_OPENVIBE-NOTFOUND")
  17. FIND_PATH(PATH_OPENVIBE include/openvibe/ov_all.h PATHS ${SRC_DIR} NO_DEFAULT_PATH)
  18. IF(PATH_OPENVIBE)
  19. debug_message( " Found OpenViBE... [${PATH_OPENVIBE}]")
  20. INCLUDE_DIRECTORIES(${PATH_OPENVIBE}/include/)
  21. TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe${OPENVIBE_LINKING})
  22. ADD_DEFINITIONS(-DTARGET_HAS_OpenViBE)
  23. ELSE(PATH_OPENVIBE)
  24. MESSAGE(WARNING " FAILED to find OpenViBE...")
  25. ENDIF(PATH_OPENVIBE)