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.

FindOpenViBEModuleXML.cmake 1.1KB

123456789101112131415161718192021222324252627282930
  1. # ---------------------------------
  2. # Finds module XML
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. OPTION(DYNAMIC_LINK_OPENVIBE_MODULE_XML "Dynamically link OpenViBE module XML" ON)
  7. IF(DYNAMIC_LINK_OPENVIBE_MODULE_XML)
  8. SET(OPENVIBE_MODULE_XML_LINKING "")
  9. ADD_DEFINITIONS(-DXML_Shared)
  10. ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_XML)
  11. SET(OPENVIBE_MODULE_XML_LINKING "-static")
  12. ADD_DEFINITIONS(-DXML_Static)
  13. SET(Boost_USE_STATIC_LIBS ON)
  14. ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_XML)
  15. set(PATH_OPENVIBE_MODULES_XML "PATH_OPENVIBE_MODULES_XML-NOTFOUND")
  16. set(SRC_DIR ${OV_BASE_DIR}/modules/xml/include)
  17. FIND_PATH(PATH_OPENVIBE_MODULES_XML xml/defines.h PATHS ${SRC_DIR} NO_DEFAULT_PATH)
  18. IF(PATH_OPENVIBE_MODULES_XML)
  19. debug_message( " Found OpenViBE module XML...")
  20. INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_XML}/)
  21. TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe-module-xml${OPENVIBE_MODULE_XML_LINKING})
  22. ADD_DEFINITIONS(-DTARGET_HAS_XML)
  23. ELSE(PATH_OPENVIBE_MODULES_XML)
  24. MESSAGE(WARNING " FAILED to find OpenViBE module XML...")
  25. ENDIF(PATH_OPENVIBE_MODULES_XML)