2021-10-14 13:47:35 +02:00

69 lines
2.0 KiB
CMake

PROJECT(openvibe-documentation)
OV_ADD_THIS_TO_PROJECT_LIST()
SET(PROJECT_VERSION_MAJOR ${OV_GLOBAL_VERSION_MAJOR})
SET(PROJECT_VERSION ${OV_GLOBAL_VERSION_STRING})
# ---------------------------------
# ---------------------------------
if(NOT(CMAKE_BUILD_TYPE) AND CMAKE_GENERATOR MATCHES "Visual Studio*")
set(MULTI_BUILD TRUE)
endif()
IF(NOT(${SKIP_DOCUMENTATION}))
if(MULTI_BUILD) # Replace with generator expression in CMake 3.5+
foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIGU)
unset(SDK_DOC_PATH CACHE)
find_path(SDK_DOC_PATH NAMES openvibe PATHS ${OPENVIBE_SDK_PATH_${OUTPUTCONFIGU}} PATH_SUFFIXES doc-tmp NO_DEFAULT_PATH)
if(SDK_DOC_PATH)
break()
endif()
endforeach()
foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIGU)
unset(DESIGNER_DOC_PATH CACHE)
find_path(DESIGNER_DOC_PATH NAMES openvibe PATHS ${OPENVIBE_DESIGNER_PATH_${OUTPUTCONFIGU}} PATH_SUFFIXES doc-tmp NO_DEFAULT_PATH)
if(DESIGNER_DOC_PATH)
break()
endif()
endforeach()
else()
set(SDK_DOC_PATH ${OPENVIBE_SDK_PATH}/doc-tmp)
set(DESIGNER_DOC_PATH ${DESIGNER_SDK_PATH}/doc-tmp)
endif()
# For boxes documentation, Add sdk dependencies dox-part folder
FILE(COPY ${SDK_DOC_PATH}/ DESTINATION ${DOCUMENTATION_TEMP_DIRECTORY})
FILE(COPY ${DESIGNER_DOC_PATH}/ DESTINATION ${DOCUMENTATION_TEMP_DIRECTORY})
OV_ADD_SOURCE_DIR("${DOCUMENTATION_TEMP_DIRECTORY}/openvibe")
IF(OV_SDK_SOURCE_PATH)
OV_ADD_SOURCE_DIR("${OV_SDK_SOURCE_PATH}")
ELSE()
MESSAGE(WARNING "Please set OV_SDK_SOURCE_PATH to enable sources documentation of sdk")
ENDIF()
add_subdirectory(src)
ENDIF()
# -----------------------------
# Install files
# -----------------------------
#INSTALL(TARGETS ${PROJECT_NAME}
# RUNTIME DESTINATION ${DIST_BINDIR}
# LIBRARY DESTINATION ${DIST_LIBDIR}
# ARCHIVE DESTINATION ${DIST_LIBDIR})
#INSTALL(DIRECTORY doc/ DESTINATION ${DIST_DOCDIR})
#INSTALL(DIRECTORY src/ DESTINATION ${DIST_INCLUDEDIR} FILES_MATCHING PATTERN "*.h" PATTERN "doc" EXCLUDE)