Commit d979aa4d authored by Jozef Legeny's avatar Jozef Legeny

core/cmake-modules:

* modified cmake modules to work with the new folder structure
- removed the openvibe branch system
+ added new way to skip subprojects, one has to set a
SKIP_PROJECT_SUBPROJECT variable in CMakeLists.txt

core/modules:
* fixed CMakeLists.txt files for FS, XML and System modules

core/kernel:
* fixed the includes of modules, now a full path (with inserted
include/) has to be specified


git-svn-id: svn://scm.gforge.inria.fr/svn/openvibe@3617 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f
parent 871d1cf7
......@@ -15,16 +15,12 @@ ELSE(DYNAMIC_LINK_OPENVIBE)
SET(OPENVIBE_LINKING "-static")
ENDIF(DYNAMIC_LINK_OPENVIBE)
IF(OV_BRANCH_OPENVIBE)
set(SRC_DIR ${OV_BASE_DIR}/openvibe/${OV_BRANCH_OPENVIBE})
ELSE(OV_BRANCH_OPENVIBE)
set(SRC_DIR ${OV_BASE_DIR}/openvibe/${OV_TRUNK})
ENDIF(OV_BRANCH_OPENVIBE)
set(SRC_DIR ${OV_BASE_DIR}/openvibe)
FIND_PATH(PATH_OPENVIBE src/openvibe/ov_all.h PATHS ${SRC_DIR})
FIND_PATH(PATH_OPENVIBE include/ov_all.h PATHS ${SRC_DIR})
IF(PATH_OPENVIBE)
MESSAGE(STATUS " Found OpenViBE...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE}/src/)
INCLUDE_DIRECTORIES(${PATH_OPENVIBE}/include/)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe${OPENVIBE_LINKING})
......
......@@ -4,7 +4,7 @@
# Adds include path
# ---------------------------------
FIND_PATH(PATH_OPENVIBE_COMMON ov_common_defines.h PATHS ${OV_BASE_DIR}/openvibe-common/src)
FIND_PATH(PATH_OPENVIBE_COMMON ov_common_defines.h PATHS ${OV_BASE_DIR}/common/include)
IF(PATH_OPENVIBE_COMMON)
MESSAGE(STATUS " Found openvibe-common...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_COMMON})
......
......@@ -11,16 +11,12 @@ ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_FS)
SET(OPENVIBE_MODULE_FS_LINKING "-static")
ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_FS)
IF(OV_BRANCH_MODULES_FS)
set(SRC_DIR ${OV_BASE_DIR}/openvibe-modules/fs/${OV_BRANCH_MODULES_FS})
ELSE(OV_BRANCH_MODULES_FS)
set(SRC_DIR ${OV_BASE_DIR}/openvibe-modules/fs/${OV_TRUNK})
ENDIF(OV_BRANCH_MODULES_FS)
set(SRC_DIR ${OV_BASE_DIR}/modules/fs/)
FIND_PATH(PATH_OPENVIBE_MODULES_FS src/fs/defines.h PATHS ${SRC_DIR})
FIND_PATH(PATH_OPENVIBE_MODULES_FS include/defines.h PATHS ${SRC_DIR})
IF(PATH_OPENVIBE_MODULES_FS)
MESSAGE(STATUS " Found OpenViBE module FS...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_FS}/src/)
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_FS}/../)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe-module-fs${OPENVIBE_MODULE_FS_LINKING})
......
......@@ -12,16 +12,12 @@ ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_SYSTEM)
ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_SYSTEM)
IF(OV_BRANCH_MODULES_SYSTEM)
set(SRC_DIR ${OV_BASE_DIR}/openvibe-modules/system/${OV_BRANCH_MODULES_SYSTEM})
ELSE(OV_BRANCH_MODULES_SYSTEM)
set(SRC_DIR ${OV_BASE_DIR}/openvibe-modules/system/${OV_TRUNK})
ENDIF(OV_BRANCH_MODULES_SYSTEM)
set(SRC_DIR ${OV_BASE_DIR}/modules/system/)
FIND_PATH(PATH_OPENVIBE_MODULES_SYSTEM src/system/defines.h PATHS ${SRC_DIR})
FIND_PATH(PATH_OPENVIBE_MODULES_SYSTEM include/defines.h PATHS ${SRC_DIR})
IF(PATH_OPENVIBE_MODULES_SYSTEM)
MESSAGE(STATUS " Found OpenViBE module System...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_SYSTEM}/src/)
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_SYSTEM}/../)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe-module-system${OPENVIBE_MODULE_SYSTEM_LINKING})
......
......@@ -12,16 +12,12 @@ ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_XML)
ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_XML)
IF(OV_BRANCH_MODULES_XML)
set(SRC_DIR ${OV_BASE_DIR}/openvibe-modules/xml/${OV_BRANCH_MODULES_XML})
ELSE(OV_BRANCH_MODULES_XML)
set(SRC_DIR ${OV_BASE_DIR}/openvibe-modules/xml/${OV_TRUNK})
ENDIF(OV_BRANCH_MODULES_XML)
set(SRC_DIR ${OV_BASE_DIR}/modules/xml)
FIND_PATH(PATH_OPENVIBE_MODULES_XML src/xml/defines.h PATHS ${SRC_DIR})
FIND_PATH(PATH_OPENVIBE_MODULES_XML include/defines.h PATHS ${SRC_DIR})
IF(PATH_OPENVIBE_MODULES_XML)
MESSAGE(STATUS " Found OpenViBE module XML...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_XML}/src/)
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_XML}/../)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} openvibe-module-xml${OPENVIBE_MODULE_XML_LINKING})
......
......@@ -7,7 +7,7 @@
# The script also adds the directory to the global list of projects.
#
FUNCTION(OV_ADD_PROJECTS CURRENT_BRANCH_PREFIX)
FUNCTION(OV_ADD_PROJECTS CURRENT_FOLDER_PREFIX)
FILE(GLOB FILENAMES "*")
......@@ -18,39 +18,30 @@ FUNCTION(OV_ADD_PROJECTS CURRENT_BRANCH_PREFIX)
SET(OV_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${DIRNAME}")
STRING(TOUPPER ${DIRNAME} DIRNAMEUPPER)
SET(BRANCH_VARIABLE_NAME "${CURRENT_BRANCH_PREFIX}_${DIRNAMEUPPER}")
SET(SKIP_THIS_FOLDER "SKIP_${CURRENT_FOLDER_PREFIX}_${DIRNAMEUPPER}")
SET(SUBDIR "SUBDIR-NOTFOUND")
# MESSAGE(STATUS "Checking ${CURRENT_BRANCH_PREFIX}_${DIRNAMEUPPER} as branch var ${BRANCH_VARIABLE_NAME}")
IF(${BRANCH_VARIABLE_NAME})
SET(BRANCH ${${BRANCH_VARIABLE_NAME}})
IF("${BRANCH}" STREQUAL "__SKIPME")
MESSAGE(STATUS "Note: ${BRANCH_VARIABLE_NAME} has been disabled by setting it to __SKIPME")
ELSE("${BRANCH}" STREQUAL "__SKIPME")
SET(SUBDIR ${BRANCH})
ENDIF("${BRANCH}" STREQUAL "__SKIPME")
ELSE(${BRANCH_VARIABLE_NAME})
SET(SUBDIR ${OV_TRUNK})
ENDIF(${BRANCH_VARIABLE_NAME})
IF(SUBDIR)
IF(${SKIP_THIS_FOLDER})
MESSAGE(STATUS "Note: ${CURRENT_FOLDER_PREFIX}/${DIRNAME} has been disabled by setting SKIP_${CURRENT_FOLDER_PREFIX}_${DIRNAMEUPPER}")
ELSE(${SKIP_THIS_FOLDER})
#MESSAGE(STATUS "Inserting folder ${SUBDIR}")
# 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};${FULLPATH}/${SUBDIR}")
SET(OV_TMP "${OV_TMP};${FULLPATH}")
SET_PROPERTY(GLOBAL PROPERTY OV_PROP_CURRENT_PROJECTS ${OV_TMP})
# MESSAGE(STATUS "BDIR ${OV_CURRENT_BINARY_DIR}/${SUBDIR}")
GET_PROPERTY(OV_TMP GLOBAL PROPERTY OV_PROP_CURRENT_PROJECTS_BUILD_DIR)
SET(OV_TMP "${OV_TMP};${OV_CURRENT_BINARY_DIR}/${SUBDIR}")
SET(OV_TMP "${OV_TMP};${OV_CURRENT_BINARY_DIR}")
SET_PROPERTY(GLOBAL PROPERTY OV_PROP_CURRENT_PROJECTS_BUILD_DIR ${OV_TMP})
add_subdirectory(${FULLPATH}/${SUBDIR})
add_subdirectory(${FULLPATH})
ENDIF(SUBDIR)
ENDIF(${SKIP_THIS_FOLDER})
ENDIF(IS_DIRECTORY ${FULLPATH} AND NOT ${FULLPATH} MATCHES ".*\\.svn")
ENDFOREACH(FULLPATH ${FILENAMES})
......
......@@ -2,7 +2,7 @@
#include "ovkCAlgorithmProxy.h"
#include "ovkCAlgorithm.h"
#include <system/Math.h>
#include <system/include/Math.h>
using namespace OpenViBE;
using namespace Kernel;
......
#include "ovkCConfigurationManager.h"
#include <fs/IEntryEnumerator.h>
#include <fs/Files.h>
#include <fs/include/IEntryEnumerator.h>
#include <fs/include/Files.h>
#include <system/Time.h>
#include <system/Math.h>
#include <system/include/Time.h>
#include <system/include/Math.h>
#include <stack>
#include <string>
......
......@@ -4,7 +4,7 @@
#include <sstream>
#include <iostream>
#include <fs/Files.h>
#include <fs/include/Files.h>
using namespace OpenViBE;
using namespace OpenViBE::Kernel;
......
......@@ -17,7 +17,7 @@
#include <functional>
#include <cctype>
#include <fs/Files.h>
#include <fs/include/Files.h>
using namespace OpenViBE;
using namespace OpenViBE::Kernel;
......@@ -200,12 +200,12 @@ boolean CKernelContext::initialize(void)
m_pConfigurationManager->createConfigurationToken("Kernel_PlayerFrequency", "128");
this->getLogManager() << LogLevel_Info << "Adding kernel configuration file [" << m_sConfigurationFile << "]\n";
if(!m_pConfigurationManager->addConfigurationFromFile(m_sConfigurationFile)) {
this->getLogManager() << LogLevel_Error << "Problem parsing '" << m_sConfigurationFile << "'. This will not work.\n";
// Since OpenViBE components usually don't react to return value of initialize(), we just quit here
this->getLogManager() << LogLevel_Error << "Forcing an exit.\n";
exit(-1);
}
if(!m_pConfigurationManager->addConfigurationFromFile(m_sConfigurationFile)) {
this->getLogManager() << LogLevel_Error << "Problem parsing '" << m_sConfigurationFile << "'. This will not work.\n";
// Since OpenViBE components usually don't react to return value of initialize(), we just quit here
this->getLogManager() << LogLevel_Error << "Forcing an exit.\n";
exit(-1);
}
// Generate the openvibe directories that the applications may write to. These are done after addConfigurationFromFile(), in case the defaults have been modified.
// @FIXME note that there is an issue if these paths are changed by a delayed configuration, then the directories are not created unless the caller does it.
......
#include "ovkCBuffer.h"
#include <system/Memory.h>
#include <system/include/Memory.h>
using namespace OpenViBE;
using namespace OpenViBE::Kernel;
......
#include <openvibe/ovITimeArithmetics.h>
#include <ovITimeArithmetics.h>
#include "ovkCPlayer.h"
#include "ovkCSimulatedBox.h"
......@@ -7,9 +7,9 @@
#include "../configuration/ovkCConfigurationManager.h"
#include <system/Time.h>
#include <system/include/Time.h>
#include <xml/IReader.h>
#include <xml/include/IReader.h>
#include <string>
#include <iostream>
......
......@@ -6,7 +6,7 @@
#include "../ovkCKernelContext.h"
#include <system/CChrono.h>
#include <system/include/CChrono.h>
#include <map>
......
......@@ -3,7 +3,7 @@
#include "../../ovk_tools.h"
#include <system/Math.h>
#include <system/include/Math.h>
using namespace OpenViBE;
using namespace Kernel;
......
#include <openvibe/ovITimeArithmetics.h>
#include <ovITimeArithmetics.h>
#include "ovkCScheduler.h"
#include "ovkCSimulatedBox.h"
#include "ovkCPlayer.h"
#include <system/Time.h>
#include <system/include/Time.h>
#include <xml/IReader.h>
#include <xml/include/IReader.h>
#include <string>
#include <iostream>
......
......@@ -3,7 +3,7 @@
#include "../ovkTKernelObject.h"
#include <system/CChrono.h>
#include <system/include/CChrono.h>
#include <map>
#include <list>
......
......@@ -6,7 +6,7 @@
#include "../ovkIGtkOVCustomHandler.h"
#include <gtk/gtk.h>
#include <system/CChrono.h>
#include <system/include/CChrono.h>
#include <vector>
#include <string>
#include <deque>
......
......@@ -3,10 +3,10 @@
#include "../../ovk_tools.h"
#include <fs/IEntryEnumerator.h>
#include <fs/Files.h>
#include <fs/include/IEntryEnumerator.h>
#include <fs/include/Files.h>
#include <system/Memory.h>
#include <system/include/Memory.h>
#include <cstdio>
#include <iostream>
......
......@@ -42,7 +42,7 @@ namespace OpenViBE
static CKernelDesc gst_oKernelDesc;
#include "system/Time.h"
#include <system/include/Time.h>
extern "C"
{
......
......@@ -5,7 +5,8 @@ SET(PROJECT_VERSION_MINOR ${OV_GLOBAL_VERSION_MINOR})
SET(PROJECT_VERSION_PATCH ${OV_GLOBAL_VERSION_PATCH})
SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
FILE(GLOB_RECURSE source_files src/*.cpp src/*.h src/*.inl)
FILE(GLOB_RECURSE source_files src/*.cpp src/*.h src/*.inl include/*.h)
INCLUDE_DIRECTORIES(include)
ADD_LIBRARY(${PROJECT_NAME} SHARED ${source_files})
......@@ -55,4 +56,4 @@ INSTALL(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
INSTALL(DIRECTORY src/ DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "doc" EXCLUDE)
INSTALL(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE)
......@@ -5,7 +5,8 @@ SET(PROJECT_VERSION_MINOR ${OV_GLOBAL_VERSION_MINOR})
SET(PROJECT_VERSION_PATCH ${OV_GLOBAL_VERSION_PATCH})
SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
FILE(GLOB_RECURSE source_files src/*.cpp src/*.h src/*.inl)
FILE(GLOB_RECURSE source_files src/*.cpp src/*.h src/*.inl include/*.h)
INCLUDE_DIRECTORIES(include)
ADD_LIBRARY(${PROJECT_NAME} SHARED ${source_files})
......@@ -69,4 +70,4 @@ INSTALL(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
INSTALL(DIRECTORY src/ DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "doc" EXCLUDE)
INSTALL(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/system FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE)
......@@ -5,7 +5,8 @@ SET(PROJECT_VERSION_MINOR ${OV_GLOBAL_VERSION_MINOR})
SET(PROJECT_VERSION_PATCH ${OV_GLOBAL_VERSION_PATCH})
SET(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
FILE(GLOB_RECURSE source_files src/*.cpp src/*.h src/*.inl)
FILE(GLOB_RECURSE source_files src/*.cpp src/*.h src/*.inl include/*.h)
INCLUDE_DIRECTORIES(include)
ADD_LIBRARY(${PROJECT_NAME} SHARED ${source_files})
......@@ -55,4 +56,4 @@ INSTALL(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
INSTALL(DIRECTORY src/ DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "doc" EXCLUDE)
INSTALL(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE)
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