123456789101112131415161718192021222324252627282930 |
- # ---------------------------------
- # Finds module XML
- # Adds library to target
- # Adds include path
- # ---------------------------------
- OPTION(DYNAMIC_LINK_OPENVIBE_MODULE_XML "Dynamically link OpenViBE module XML" ON)
-
- IF(DYNAMIC_LINK_OPENVIBE_MODULE_XML)
- SET(OPENVIBE_MODULE_XML_LINKING "")
- ADD_DEFINITIONS(-DXML_Shared)
- ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_XML)
- SET(OPENVIBE_MODULE_XML_LINKING "-static")
- ADD_DEFINITIONS(-DXML_Static)
- SET(Boost_USE_STATIC_LIBS ON)
- ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_XML)
-
- set(PATH_OPENVIBE_MODULES_XML "PATH_OPENVIBE_MODULES_XML-NOTFOUND")
- set(SRC_DIR ${OV_BASE_DIR}/modules/xml/include)
-
- FIND_PATH(PATH_OPENVIBE_MODULES_XML xml/defines.h PATHS ${SRC_DIR} NO_DEFAULT_PATH)
- IF(PATH_OPENVIBE_MODULES_XML)
- debug_message( " Found OpenViBE module XML...")
- INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_XML}/)
-
- TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe-module-xml${OPENVIBE_MODULE_XML_LINKING})
-
- ADD_DEFINITIONS(-DTARGET_HAS_XML)
- ELSE(PATH_OPENVIBE_MODULES_XML)
- MESSAGE(WARNING " FAILED to find OpenViBE module XML...")
- ENDIF(PATH_OPENVIBE_MODULES_XML)
|