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.

FindOpenViBEModuleFS.cmake 1.0KB

1234567891011121314151617181920212223242526272829
  1. # ---------------------------------
  2. # Finds module FS
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. OPTION(DYNAMIC_LINK_OPENVIBE_MODULE_FS "Dynamically link OpenViBE module FS" ON)
  7. IF(DYNAMIC_LINK_OPENVIBE_MODULE_FS)
  8. SET(OPENVIBE_MODULE_FS_LINKING "")
  9. ADD_DEFINITIONS(-DFS_Shared)
  10. ELSE()
  11. SET(OPENVIBE_MODULE_FS_LINKING "-static")
  12. ADD_DEFINITIONS(-DFS_Static)
  13. ENDIF()
  14. set(PATH_OPENVIBE_MODULES_FS "PATH_OPENVIBE_MODULES_FS-NOTFOUND")
  15. set(SRC_DIR ${OV_BASE_DIR}/modules/fs/include)
  16. FIND_PATH(PATH_OPENVIBE_MODULES_FS fs/defines.h PATHS ${SRC_DIR} NO_DEFAULT_PATH)
  17. IF(PATH_OPENVIBE_MODULES_FS)
  18. debug_message( " Found OpenViBE module FS... openvibe-module-fs${OPENVIBE_MODULE_FS_LINKING}")
  19. INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_FS}/)
  20. TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe-module-fs${OPENVIBE_MODULE_FS_LINKING})
  21. ADD_DEFINITIONS(-DTARGET_HAS_FS)
  22. ELSE(PATH_OPENVIBE_MODULES_FS)
  23. MESSAGE(WARNING " FAILED to find OpenViBE module FS...")
  24. ENDIF(PATH_OPENVIBE_MODULES_FS)