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.

FindOpenViBEModuleCommunication.cmake 1.2KB

1234567891011121314151617181920212223242526272829
  1. # ---------------------------------
  2. # Finds module Communication
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. OPTION(DYNAMIC_LINK_OPENVIBE_MODULE_COMMUNICATION "Dynamically link OpenViBE module Communication" ON)
  7. IF(DYNAMIC_LINK_OPENVIBE_MODULE_COMMUNICATION)
  8. SET(OPENVIBE_MODULE_COMMUNICATION_LINKING "")
  9. ADD_DEFINITIONS(-DCommunication_Shared)
  10. ELSE()
  11. SET(OPENVIBE_MODULE_COMMUNICATION_LINKING "-static")
  12. ADD_DEFINITIONS(-DCommunication_Static)
  13. ENDIF()
  14. set(PATH_OPENVIBE_MODULES_COMMUNICATION "PATH_OPENVIBE_MODULES_COMMUNICATION-NOTFOUND")
  15. set(SRC_DIR ${OV_BASE_DIR}/modules/communication/include)
  16. FIND_PATH(PATH_OPENVIBE_MODULES_COMMUNICATION communication/defines.h PATHS ${SRC_DIR} NO_DEFAULT_PATH)
  17. IF(PATH_OPENVIBE_MODULES_COMMUNICATION)
  18. MESSAGE(STATUS " Found OpenViBE module Communication... ${PATH_OPENVIBE_MODULE_COMMUNICATION}/openvibe-module-communication${OPENVIBE_MODULE_COMMUNICATION_LINKING}")
  19. INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_COMMUNICATION}/)
  20. TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe-module-communication${OPENVIBE_MODULE_COMMUNICATION_LINKING})
  21. ADD_DEFINITIONS(-DTARGET_HAS_COMMUNICATION)
  22. ELSE()
  23. MESSAGE(WARNING " FAILED to find OpenViBE module Communication...")
  24. ENDIF()