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.

FindOpenViBEVisualizationToolkit.cmake 1.3KB

123456789101112131415161718192021222324252627282930313233
  1. # ---------------------------------
  2. # Finds openvibe-toolkit
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. option(LINK_OPENVIBE_VISUALIZATION_TOOLKIT "By default, link openvibe-visualization-toolkit, otherwise only use the includes" ON)
  7. option(DYNAMIC_LINK_OPENVIBE_VISUALIZATION_TOOLKIT "Dynamically link openvibe-visualization-toolkit" ON)
  8. if(DYNAMIC_LINK_OPENVIBE_VISUALIZATION_TOOLKIT)
  9. set(OPENVIBE_VISUALIZATION_TOOLKIT_LINKING "")
  10. add_definitions(-DOVVIZ_Shared)
  11. else()
  12. set(OPENVIBE_VISUALIZATION_TOOLKIT_LINKING "-static")
  13. add_definitions(-DOVVIZ_Static)
  14. endif()
  15. set(SRC_DIR ${OV_BASE_DIR}/visualization-toolkit/include)
  16. set(PATH_OPENVIBE_VISUALIZATION_TOOLKIT "PATH_OPENVIBE_VISUALIZATION_TOOLKIT-NOTFOUND")
  17. find_path(PATH_OPENVIBE_VISUALIZATION_TOOLKIT visualization-toolkit/ovviz_all.h PATHS ${SRC_DIR} NO_DEFAULT_PATH)
  18. if(PATH_OPENVIBE_VISUALIZATION_TOOLKIT)
  19. debug_message( " Found openvibe-toolkit... ${PATH_OPENVIBE_VISUALIZATION_TOOLKIT}")
  20. include_directories(${PATH_OPENVIBE_VISUALIZATION_TOOLKIT}/)
  21. if(LINK_OPENVIBE_VISUALIZATION_TOOLKIT)
  22. target_link_libraries(${PROJECT_NAME} openvibe-visualization-toolkit${OPENVIBE_VISUALIZATION_TOOLKIT_LINKING})
  23. endif()
  24. add_definitions(-DTARGET_HAS_OpenViBEVisualizationToolkit)
  25. else()
  26. message(WARNING " FAILED to find openvibe-visualization-toolkit...")
  27. endif()