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.

FindOpenViBEModuleStream.cmake 1.2KB

3 years ago
123456789101112131415161718192021222324252627282930
  1. # ---------------------------------
  2. # Finds module Stream
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. OPTION(DYNAMIC_LINK_OPENVIBE_MODULE_STREAM "Dynamically link OpenViBE module Stream" ON)
  7. IF(DYNAMIC_LINK_OPENVIBE_MODULE_STREAM)
  8. SET(OPENVIBE_MODULE_STREAM_LINKING "")
  9. ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_STREAM)
  10. SET(OPENVIBE_MODULE_STREAM_LINKING "-static")
  11. ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_STREAM)
  12. IF(OV_BRANCH_MODULES_STREAM)
  13. set(SRC_DIR ${OV_BASE_DIR}/openvibe-modules/stream/${OV_BRANCH_MODULES_STREAM})
  14. ELSE(OV_BRANCH_MODULES_STREAM)
  15. set(SRC_DIR ${OV_BASE_DIR}/openvibe-modules/stream/${OV_TRUNK})
  16. ENDIF(OV_BRANCH_MODULES_STREAM)
  17. FIND_PATH(PATH_OPENVIBE_MODULES_STREAM src/stream/defines.h PATHS ${OV_BASE_DIR}/openvibe-modules/stream)
  18. IF(PATH_OPENVIBE_MODULES_STREAM)
  19. debug_message( " Found OpenViBE module Stream...")
  20. INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_STREAM}/include)
  21. TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe-module-stream${OPENVIBE_MODULE_STREAM_LINKING})
  22. ADD_DEFINITIONS(-DTARGET_HAS_Stream)
  23. ELSE(PATH_OPENVIBE_MODULES_STREAM)
  24. MESSAGE(WARNING " FAILED to find OpenViBE module Stream...")
  25. ENDIF(PATH_OPENVIBE_MODULES_STREAM)