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.

FindOpenViBEToolkit.cmake 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # ---------------------------------
  2. # Finds openvibe-toolkit
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. OPTION(LINK_OPENVIBE_TOOLKIT "By default, link openvibe-toolkit, otherwise only use the includes" ON)
  7. OPTION(DYNAMIC_LINK_OPENVIBE_TOOLKIT "Dynamically link openvibe-toolkit" ON)
  8. IF(DYNAMIC_LINK_OPENVIBE_TOOLKIT)
  9. SET(OPENVIBE_TOOLKIT_LINKING "")
  10. ADD_DEFINITIONS(-DOVTK_Shared)
  11. ELSE()
  12. SET(OPENVIBE_TOOLKIT_LINKING "-static")
  13. ADD_DEFINITIONS(-DOVTK_Static)
  14. ENDIF()
  15. SET(SRC_DIR ${OV_BASE_DIR}/toolkit/include)
  16. FIND_PATH(PATH_OPENVIBE_TOOLKIT toolkit/ovtk_all.h PATHS ${SRC_DIR} NO_DEFAULT_PATH)
  17. IF(PATH_OPENVIBE_TOOLKIT)
  18. debug_message( " Found openvibe-toolkit... ${PATH_OPENVIBE_TOOLKIT} ${PATH_OPENVIBE_TOOLKIT_BIN}")
  19. INCLUDE_DIRECTORIES(${PATH_OPENVIBE_TOOLKIT})
  20. # No find path for this directory as content is not generated yet
  21. INCLUDE_DIRECTORIES(${OV_BASE_BIN_DIR}/toolkit/include)
  22. IF(LINK_OPENVIBE_TOOLKIT)
  23. TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe-toolkit${OPENVIBE_TOOLKIT_LINKING})
  24. ENDIF()
  25. ADD_DEFINITIONS(-DTARGET_HAS_OpenViBEToolkit)
  26. ELSE()
  27. MESSAGE(FATAL " FAILED to find openvibe-toolkit...")
  28. ENDIF()
  29. INCLUDE("FindOpenViBEModuleXML")