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.

FindOpenViBEModuleDate.cmake 973B

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