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.

FindOpenViBEModuleSystem.cmake 1.0KB

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