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.

CMakeLists.txt 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. PROJECT(openvibe-documentation)
  2. OV_ADD_THIS_TO_PROJECT_LIST()
  3. SET(PROJECT_VERSION_MAJOR ${OV_GLOBAL_VERSION_MAJOR})
  4. SET(PROJECT_VERSION ${OV_GLOBAL_VERSION_STRING})
  5. # ---------------------------------
  6. # ---------------------------------
  7. if(NOT(CMAKE_BUILD_TYPE) AND CMAKE_GENERATOR MATCHES "Visual Studio*")
  8. set(MULTI_BUILD TRUE)
  9. endif()
  10. IF(NOT(${SKIP_DOCUMENTATION}))
  11. if(MULTI_BUILD) # Replace with generator expression in CMake 3.5+
  12. foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
  13. string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIGU)
  14. unset(SDK_DOC_PATH CACHE)
  15. find_path(SDK_DOC_PATH NAMES openvibe PATHS ${OPENVIBE_SDK_PATH_${OUTPUTCONFIGU}} PATH_SUFFIXES doc-tmp NO_DEFAULT_PATH)
  16. if(SDK_DOC_PATH)
  17. break()
  18. endif()
  19. endforeach()
  20. foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
  21. string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIGU)
  22. unset(DESIGNER_DOC_PATH CACHE)
  23. find_path(DESIGNER_DOC_PATH NAMES openvibe PATHS ${OPENVIBE_DESIGNER_PATH_${OUTPUTCONFIGU}} PATH_SUFFIXES doc-tmp NO_DEFAULT_PATH)
  24. if(DESIGNER_DOC_PATH)
  25. break()
  26. endif()
  27. endforeach()
  28. else()
  29. set(SDK_DOC_PATH ${OPENVIBE_SDK_PATH}/doc-tmp)
  30. set(DESIGNER_DOC_PATH ${DESIGNER_SDK_PATH}/doc-tmp)
  31. endif()
  32. # For boxes documentation, Add sdk dependencies dox-part folder
  33. FILE(COPY ${SDK_DOC_PATH}/ DESTINATION ${DOCUMENTATION_TEMP_DIRECTORY})
  34. FILE(COPY ${DESIGNER_DOC_PATH}/ DESTINATION ${DOCUMENTATION_TEMP_DIRECTORY})
  35. OV_ADD_SOURCE_DIR("${DOCUMENTATION_TEMP_DIRECTORY}/openvibe")
  36. IF(OV_SDK_SOURCE_PATH)
  37. OV_ADD_SOURCE_DIR("${OV_SDK_SOURCE_PATH}")
  38. ELSE()
  39. MESSAGE(WARNING "Please set OV_SDK_SOURCE_PATH to enable sources documentation of sdk")
  40. ENDIF()
  41. add_subdirectory(src)
  42. ENDIF()
  43. # -----------------------------
  44. # Install files
  45. # -----------------------------
  46. #INSTALL(TARGETS ${PROJECT_NAME}
  47. # RUNTIME DESTINATION ${DIST_BINDIR}
  48. # LIBRARY DESTINATION ${DIST_LIBDIR}
  49. # ARCHIVE DESTINATION ${DIST_LIBDIR})
  50. #INSTALL(DIRECTORY doc/ DESTINATION ${DIST_DOCDIR})
  51. #INSTALL(DIRECTORY src/ DESTINATION ${DIST_INCLUDEDIR} FILES_MATCHING PATTERN "*.h" PATTERN "doc" EXCLUDE)