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.

FindOpenViBEModuleCSV.cmake 1.0KB

3 years ago
123456789101112131415161718192021222324252627282930
  1. # ---------------------------------
  2. # Finds module CSV
  3. # Adds library to target
  4. # Adds include path
  5. # ---------------------------------
  6. OPTION(DYNAMIC_LINK_OPENVIBE_MODULE_CSV "Dynamically link OpenViBE module CSV" ON)
  7. IF(DYNAMIC_LINK_OPENVIBE_MODULE_CSV)
  8. SET(OPENVIBE_MODULE_CSV_LINKING "")
  9. ADD_DEFINITIONS(-DCSV_Shared)
  10. ELSE()
  11. SET(OPENVIBE_MODULE_CSV_LINKING "-static")
  12. ADD_DEFINITIONS(-DCSV_Static)
  13. ENDIF()
  14. set(PATH_OPENVIBE_MODULES_CSV "PATH_OPENVIBE_MODULES_CSV-NOTFOUND")
  15. set(SRC_DIR ${OV_BASE_DIR}/modules/csv/include)
  16. FIND_PATH(PATH_OPENVIBE_MODULES_CSV csv/defines.h PATHS ${SRC_DIR} NO_DEFAULT_PATH)
  17. IF(PATH_OPENVIBE_MODULES_CSV)
  18. debug_message( " Found OpenViBE module CSV...")
  19. INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_CSV}/)
  20. debug_message( " Link openvibe-module-csv${OPENVIBE_MODULE_CSV_LINKING}")
  21. TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe-module-csv${OPENVIBE_MODULE_CSV_LINKING})
  22. ADD_DEFINITIONS(-DTARGET_HAS_CSV)
  23. ELSE()
  24. MESSAGE(WARNING " FAILED to find OpenViBE module CSV...")
  25. ENDIF()