|
1234567891011121314151617181920212223242526272829 |
- # ---------------------------------
- # Finds module Communication
- # Adds library to target
- # Adds include path
- # ---------------------------------
- OPTION(DYNAMIC_LINK_OPENVIBE_MODULE_COMMUNICATION "Dynamically link OpenViBE module Communication" ON)
-
- IF(DYNAMIC_LINK_OPENVIBE_MODULE_COMMUNICATION)
- SET(OPENVIBE_MODULE_COMMUNICATION_LINKING "")
- ADD_DEFINITIONS(-DCommunication_Shared)
- ELSE()
- SET(OPENVIBE_MODULE_COMMUNICATION_LINKING "-static")
- ADD_DEFINITIONS(-DCommunication_Static)
- ENDIF()
-
- set(PATH_OPENVIBE_MODULES_COMMUNICATION "PATH_OPENVIBE_MODULES_COMMUNICATION-NOTFOUND")
- set(SRC_DIR ${OV_BASE_DIR}/modules/communication/include)
-
- FIND_PATH(PATH_OPENVIBE_MODULES_COMMUNICATION communication/defines.h PATHS ${SRC_DIR} NO_DEFAULT_PATH)
- IF(PATH_OPENVIBE_MODULES_COMMUNICATION)
- MESSAGE(STATUS " Found OpenViBE module Communication... ${PATH_OPENVIBE_MODULE_COMMUNICATION}/openvibe-module-communication${OPENVIBE_MODULE_COMMUNICATION_LINKING}")
- INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_COMMUNICATION}/)
-
- TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe-module-communication${OPENVIBE_MODULE_COMMUNICATION_LINKING})
-
- ADD_DEFINITIONS(-DTARGET_HAS_COMMUNICATION)
- ELSE()
- MESSAGE(WARNING " FAILED to find OpenViBE module Communication...")
- ENDIF()
|