Commit 54ca6ad2 authored by Jozef Legeny's avatar Jozef Legeny

cmake-modules:

+ added a OV_ADD_THIS_TO_PROJECTS() function to be able to include
standalone projects in the documentation

documentation:
+ bugfixes


git-svn-id: svn://scm.gforge.inria.fr/svn/openvibe@3727 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f
parent 10780d0e
......@@ -9,9 +9,9 @@ SET(OV_GLOBAL_VERSION_MINOR "X")
SET(OV_GLOBAL_VERSION_PATCH "Y")
# Default is to build to dist/. If you wish a custom install, set your own MAKE_INSTALL_PREFIX when you call CMake. Safest to do under a fakeroot.
IF(NOT CMAKE_INSTALL_PREFIX)
#IF(NOT CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/dist")
ENDIF(NOT CMAKE_INSTALL_PREFIX)
#ENDIF(NOT CMAKE_INSTALL_PREFIX)
MESSAGE(STATUS "Appending compilation flags...")
......@@ -93,7 +93,7 @@ MESSAGE(STATUS " CMAKE_CXX_FLAGS_DEBUG = '${CMAKE_CXX_FLAGS_DEBUG}'")
#SET(OV_BRANCH_APPLICATIONS_VRPN-SIMULATOR "branches/mybranch")
#SET(OV_BRANCH_DOCUMENTATION "branches/mybranch")
SET(SKIP_DOCUMENTATION "1")
#SET(SKIP_DOCUMENTATION "1")
#SET(SKIP_CONTRIB_PLUGINS_PROCESSING_PYTHON "1")
#SET(SKIP_MODULES_AUTOMATON "1")
......
# Adds the current project to the global properties
FUNCTION(OV_ADD_THIS_TO_PROJECT_LIST)
MESSAGE(STATUS "ADDING: ${CMAKE_CURRENT_SOURCE_DIR}")
# Add the dir to be parsed for documentation later. We need to do this before adding subdir, in case the subdir is the actual docs dir
GET_PROPERTY(OV_TMP GLOBAL PROPERTY OV_PROP_CURRENT_PROJECTS)
SET(OV_TMP "${OV_TMP};${CMAKE_CURRENT_SOURCE_DIR}")
SET_PROPERTY(GLOBAL PROPERTY OV_PROP_CURRENT_PROJECTS ${OV_TMP})
ENDFUNCTION(OV_ADD_THIS_TO_PROJECT_LIST)
#
# Adds all directories as subdirectories to the CMake build, using the branch specified (if any) in the root CMakeList.txt or
# trunk otherwise.
......@@ -30,8 +41,7 @@ FUNCTION(OV_ADD_PROJECTS CURRENT_FOLDER_PREFIX)
SET(OV_TMP "${OV_TMP};${FULLPATH}")
SET_PROPERTY(GLOBAL PROPERTY OV_PROP_CURRENT_PROJECTS ${OV_TMP})
SET(OV_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${DIRNAME}")
# MESSAGE(STATUS "BDIR ${OV_CURRENT_BINARY_DIR}")
SET(OV_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${DIRNAME}")
GET_PROPERTY(OV_TMP GLOBAL PROPERTY OV_PROP_CURRENT_PROJECTS_BUILD_DIR)
SET(OV_TMP "${OV_TMP};${OV_CURRENT_BINARY_DIR}")
SET_PROPERTY(GLOBAL PROPERTY OV_PROP_CURRENT_PROJECTS_BUILD_DIR ${OV_TMP})
......
PROJECT(openvibe-documentation)
OV_ADD_THIS_TO_PROJECT_LIST()
SET(PROJECT_VERSION_MAJOR ${OV_GLOBAL_VERSION_MAJOR})
SET(PROJECT_VERSION_MINOR ${OV_GLOBAL_VERSION_MINOR})
......
......@@ -38,11 +38,23 @@ IF(doxygen_bin)
FOREACH(current_project ${CURRENT_PROJECTS})
STRING(REGEX REPLACE " +$" "" current_project ${current_project})
SET(current_project_src "${current_project}/src")
SET(current_project_doc "${current_project}/doc")
# updates the doxyfile variable for input directories
SET(ov_doxy_input "${ov_doxy_input} \\\"${current_project_src}\\\"")
IF(EXISTS "${current_project}/include")
SET(current_project_include "${current_project}/include")
SET(ov_doxy_input "${ov_doxy_input} \\\"${current_project_include}\\\"")
ENDIF(EXISTS "${current_project}/include")
IF(EXISTS "${current_project}/src")
SET(current_project_src "${current_project}/src")
SET(ov_doxy_input "${ov_doxy_input} \\\"${current_project_src}\\\"")
ENDIF(EXISTS "${current_project}/src")
IF(EXISTS "${current_project}/doc")
SET(current_project_doc "${current_project}/doc")
SET(ov_doxy_input "${ov_doxy_input} \\\"${current_project_doc}\\\"")
ENDIF(EXISTS "${current_project}/doc")
#MESSAGE(STATUS " [ OK ] Candidate doc directory found ${current_project_src}")
# looks for resources and stores them in a list
......@@ -70,6 +82,7 @@ IF(doxygen_bin)
ENDIF(WIN32)
# these two lines configure the variables used to configure the doxyfile
SET(ov_doxy_input "${ov_doxy_input} \\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"")
SET(ov_doxy_input "${ov_doxy_input} \\\"${CMAKE_CURRENT_BINARY_DIR}\\\"")
SET(ov_doxy_strip_from_path ${ov_doxy_input})
SET(ov_doxy_version ${PROJECT_VERSION})
......
......@@ -26,7 +26,7 @@ ENDFOREACH(current_project)
MESSAGE(STATUS "Running plugin inspector")
MESSAGE(STATUS ${ov_plugin_inspector_load_path})
#MESSAGE(STATUS ${ov_plugin_inspector_load_path})
IF(UNIX)
EXECUTE_PROCESS(
COMMAND @CMAKE_CURRENT_BINARY_DIR@/../../applications/developer-tools/plugin-inspector/openvibe-plugin-inspector
......@@ -174,6 +174,22 @@ EXECUTE_PROCESS(
WORKING_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@"
)
# 'patch' the docs, this takes some time, is it worth doing it?
# original linux-build directive:
# find $target_dist/doc -name *.html -exec sed -i -e "s/\xC2\?\xA7OpenViBE\xC2\?\xA7/OpenViBE/g" "{}" \;
# \xC2\?\xA7 is the character that has been put everywhere to clearly make the distinction between the project and the software
#MESSAGE(STATUS "Patching special characters in HTML docs ...")
#FILE(GLOB_RECURSE HTML_DOCS "${CMAKE_CURRENT_BINARY_DIR}/../doc/html/*.html")
#MESSAGE(STATUS "IAMIN ${CMAKE_CURRENT_BINARY_DIR}/../doc/html/")
#MESSAGE(STATUS "got ${HTML_DOCS}")
#FOREACH(HTML_DOC ${HTML_DOCS})
# MESSAGE(STATUS "Processing ${HTML_DOC}")
# FILE(READ ${HTML_DOC} ORIG_FILE)
# STRING(REGEX REPLACE "[^ a-zA-Z0-9:.,]OpenViBE[^ a-zA-Z0-9:.,]" "OpenViBE" TRANSLATED_FILE ${ORIG_FILE})
# FILE(WRITE ${HTML_DOC} ${TRANSLATED_FILE})
#ENDFOREACH(HTML_DOC)
FILE(GLOB_RECURSE resource_files_tmp "@CMAKE_CURRENT_BINARY_DIR@/*.png")
SET(resource_files ${resource_files} ${resource_files_tmp})
......@@ -186,18 +202,4 @@ IF(resource_files)
ENDIF(resource_files)
# 'patch' the docs, this takes some time, is it worth doing it?
# original linux-build directive:
# find $target_dist/doc -name *.html -exec sed -i -e "s/\xC2\?\xA7OpenViBE\xC2\?\xA7/OpenViBE/g" "{}" \;
# \xC2\?\xA7 is the character that has been put everywhere to clearly make the distinction between the project and the software
#MESSAGE(STATUS "Patching special characters in HTML docs ...")
#FILE(GLOB_RECURSE HTML_DOCS "@CMAKE_CURRENT_BINARY_DIR@/../doc/html/" "*.html")
# MESSAGE(STATUS "got ${HTML_DOCS}")
#FOREACH(HTML_DOC ${HTML_DOCS})
# MESSAGE(STATUS "Processing ${HTML_DOC}")
# FILE(READ ${HTML_DOC} ORIG_FILE)
#STRING(REPLACE "OpenViBE" "OpenViBE" TRANSLATED_FILE ${ORIG_FILE})
# FILE(WRITE ${HTML_DOC} ${TRANSLATED_FILE})
#ENDFOREACH(HTML_DOC)
PROJECT(openvibe-kernel)
OV_ADD_THIS_TO_PROJECT_LIST()
SET(PROJECT_VERSION_MAJOR ${OV_GLOBAL_VERSION_MAJOR})
SET(PROJECT_VERSION_MINOR ${OV_GLOBAL_VERSION_MINOR})
......
PROJECT(openvibe)
OV_ADD_THIS_TO_PROJECT_LIST()
SET(PROJECT_VERSION_MAJOR ${OV_GLOBAL_VERSION_MAJOR})
SET(PROJECT_VERSION_MINOR ${OV_GLOBAL_VERSION_MINOR})
......
PROJECT(openvibe-toolkit)
OV_ADD_THIS_TO_PROJECT_LIST()
SET(PROJECT_VERSION_MAJOR ${OV_GLOBAL_VERSION_MAJOR})
SET(PROJECT_VERSION_MINOR ${OV_GLOBAL_VERSION_MINOR})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment