Commit 8f661d8e authored by Jussi Lindgren's avatar Jussi Lindgren

cmake-modules:

 * Third-party driver libs are now copied to dist/bin/ in the INSTALL stage instead of polluting the source tree during build phase.
root:
 * Small cosmetic changes to INSTALL and CMakeLists.txt 


git-svn-id: svn://scm.gforge.inria.fr/svn/openvibe@3411 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f
parent 3c7c157b
......@@ -12,10 +12,10 @@ ELSE(WIN32)
MESSAGE(STATUS "Warning: unknown platform")
ENDIF(WIN32)
# if no specific branch has been given, default is to compile trunk
# if no specific branch has been given for a component, default is to compile trunk
SET(OV_TRUNK "trunc")
# To compile your own non-trunch branches, add variables OV_BRANCH_[DIR OR DIR_DIR]_[branches/YOURBRANCH] for each.
# To compile your own non-trunk branches, add variables OV_BRANCH_[DIR OR DIR_DIR] to point to "branches/YOURBRANCH" for each.
# Branch name __SKIPME signifies that this component should not be compiled or installed.
#SET(OV_BRANCH_PLUGINS_PYTHON "__SKIPME") # skips python module
#SET(OV_BRANCH_DOCUMENTATION "__SKIPME") # skips documentation module
......@@ -52,7 +52,7 @@ SET(OV_TRUNK "trunc")
#SET(OV_BRANCH_APPLICATIONS_ACQUISITION-SERVER "branches/mybranch")
#SET(OV_BRANCH_APPLICATIONS_DESIGNER "branches/mybranch")
#SET(OV_BRANCH_APPLICATIONS_EXTERNAL-STIMULATION-CONNECTION-EXAMPLE "branches/mybranch")
#SET(OV_BRANCH_APPLICATIONS_ID-GENERATOR "branches/wip-jussi")
#SET(OV_BRANCH_APPLICATIONS_ID-GENERATOR "branches/mybranch")
#SET(OV_BRANCH_APPLICATIONS_PLUGIN-INSPECTOR "branches/mybranch")
#SET(OV_BRANCH_APPLICATIONS_SKELETON-GENERATOR "branches/mybranch")
#SET(OV_BRANCH_APPLICATIONS_SSVEP-DEMO "branches/mybranch")
......@@ -62,7 +62,7 @@ SET(OV_TRUNK "trunc")
# SET(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/dist")
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake-modules")
# a list of all projects, will be filled by the directory traversal. This is needed to generate the documentation.
# a list of all project which will be filled by the directory traversal. This is needed to generate the documentation.
SET_PROPERTY(GLOBAL PROPERTY OV_PROP_CURRENT_PROJECTS "")
# needed for making visual studio projects when this script is called without CMAKE_BUILD_TYPE
......@@ -70,11 +70,12 @@ SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG "TARGET_BUILDTY
SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE "TARGET_BUILDTYPE_Release")
SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO "TARGET_BUILDTYPE_Release")
# Include some OpenViBE build specific helper functions that are used by the CMakeLists of the subprojects.
# OpenViBE-specific helper functions that are used by the CMakeLists of the subprojects.
INCLUDE("OvAddSingleProject")
INCLUDE("OvAddProjects")
INCLUDE("OvInstallLaunchScript")
# Traverse these directories and build their components
ADD_SUBDIRECTORY("openvibe/")
ADD_SUBDIRECTORY("openvibe-kernel-omk/")
ADD_SUBDIRECTORY("openvibe-modules/")
......@@ -96,7 +97,7 @@ INSTALL(CODE "FILE(MAKE_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/doc\")")
INSTALL(CODE "FILE(MAKE_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/log\")")
INSTALL(CODE "FILE(MAKE_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/tmp\")")
# make copy of the dependency script, this is done so we can use the same launch scripts both in win install and win devel situations.
# make a copy of the dependency script, this is done so we can use the same launch scripts both in win install and win devel situations.
IF(WIN32)
INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/win32-dependencies.cmd DESTINATION ${CMAKE_INSTALL_PREFIX}/bin RENAME "OpenViBE-set-env.cmd")
ENDIF(WIN32)
......@@ -108,14 +109,14 @@ ENDIF(UNIX)
# Generate 'external application launcher' script
# ----------------------
IF(WIN32)
SET(CMD_FILE "OpenViBE-external-application-launcher.cmd")
SET(OV_EXT_CMD_FILE "OpenViBE-external-application-launcher.cmd")
ENDIF(WIN32)
IF(UNIX)
SET(CMD_FILE "OpenViBE-external-application-launcher.sh")
SET(OV_EXT_CMD_FILE "OpenViBE-external-application-launcher.sh")
ENDIF(UNIX)
CONFIGURE_FILE("${CMAKE_MODULE_PATH}/launchers/${CMD_FILE}-base" "${CMAKE_CURRENT_BINARY_DIR}/${CMD_FILE}")
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${CMD_FILE} DESTINATION "bin/")
CONFIGURE_FILE("${CMAKE_MODULE_PATH}/launchers/${OV_EXT_CMD_FILE}-base" "${CMAKE_CURRENT_BINARY_DIR}/${OV_EXT_CMD_FILE}")
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${OV_EXT_CMD_FILE} DESTINATION "bin/")
......@@ -30,6 +30,23 @@ but you should not expect to get support on the short term.
|Building on Windows|
0. Short story:
For command line -style building with NMake, double-click:
# win32-install_dependencies
# win32-build
For IDE style building with Visual Studio, double-click:
# win32-install_dependencies
# win32-generate-vcproj
# win32-launch-vc
You may have to tweak the last script to find your particular version of Visual Studio.
The built openvibe should now be in "dist\" folder. If it didn't work, read the longer description for hints.
1. Install dependencies
In order to build the software, you must install several dependencies.
......@@ -83,6 +100,13 @@ and the freshly built OpenViBE in "dist\".
|Building on Linux|
0. Short story
# ./linux-install_dependencies
# ./linux-build
The built OpenViBE should be in "dist/". If not, read the longer description for hints.
1. Install dependencies
In order to build the software, one must install several dependencies.
......
......@@ -45,24 +45,12 @@ IF(WIN32)
MESSAGE(STATUS " [FAILED] firmware actiCHamp")
ENDIF(FIRMWARE_ActiCHampAPI)
# Copying the DLL file at postbuild
ADD_CUSTOM_COMMAND(
TARGET ${PROJECT_NAME}-dynamic
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy "${PATH_ActiCHampAPI}/actiCHamp_x86.dll" "${PROJECT_SOURCE_DIR}/bin"
COMMENT " ---> Copying dll file ${PATH_ActiCHampAPI}/actiCHamp_x86.dll for the BrainProducts actiCHamp driver."
VERBATIM)
# Copying the firmware file at postbuild
ADD_CUSTOM_COMMAND(
TARGET ${PROJECT_NAME}-dynamic
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy "${FIRMWARE_ActiCHampAPI}" "${PROJECT_SOURCE_DIR}/bin"
COMMENT " ---> Copying firmware file ${FIRMWARE_ActiCHampAPI} for the BrainProducts actiCHamp driver."
VERBATIM)
# Copy the DLL file at install
INSTALL(PROGRAMS "${PATH_ActiCHampAPI}/actiCHamp_x86.dll" DESTINATION "bin")
# Copy the firmware file at install
INSTALL(PROGRAMS "${FIRMWARE_ActiCHampAPI}" DESTINATION "bin")
ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyActiCHampAPI)
ELSE(PATH_ActiCHampAPI)
MESSAGE(STATUS " FAILED to find actiCHamp API - cmake looked in 'C:/Program Files/actichamp' and 'C:/Program Files (x86)/actichamp'")
......
......@@ -24,14 +24,8 @@ IF(WIN32)
ENDIF(LIB_BrainmasterCodeMakerAPI1)
ENDFOREACH(LIB_BrainmasterCodeMakerAPI1)
# Copying the DLL file at postbuild
ADD_CUSTOM_COMMAND(
TARGET ${PROJECT_NAME}-dynamic
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy "${PATH_BrainmasterCodeMakerAPI}/bmrcm.dll" "${PROJECT_SOURCE_DIR}/bin"
COMMENT " ---> Copying dll file ${PATH_BrainmasterCodeMakerAPI}/bmrcm.dll for the Brainmaster Code Maker API folder."
VERBATIM)
# Copy the DLL file at install
INSTALL(PROGRAMS "${PATH_BrainmasterCodeMakerAPI}/bmrcm.dll" DESTINATION "bin")
ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyBrainmasterCodeMakerAPI)
ELSE(PATH_BrainmasterCodeMakerAPI)
......
......@@ -33,21 +33,7 @@ IF(WIN32)
MESSAGE(STATUS " [FAILED] lib Emotiv edk.lib")
ENDIF(LIB_EmotivAPI)
# Copying the DLL files at postbuild : not needed anymore cf delay load library
# ADD_CUSTOM_COMMAND(
# TARGET ${PROJECT_NAME}-dynamic
# POST_BUILD
# COMMAND ${CMAKE_COMMAND}
# ARGS -E copy "${PATH_EmotivAPI}/../bin/edk.dll" "${PROJECT_SOURCE_DIR}/bin"
# COMMENT " ---> Copying dll file ${PATH_EmotivAPI}/../bin/edk.dll for the Emotiv EPOC driver."
# VERBATIM)
# ADD_CUSTOM_COMMAND(
# TARGET ${PROJECT_NAME}-dynamic
# POST_BUILD
# COMMAND ${CMAKE_COMMAND}
# ARGS -E copy "${PATH_EmotivAPI}/../bin/edk_utils.dll" "${PROJECT_SOURCE_DIR}/bin"
# COMMENT " ---> Copying dll file ${PATH_EmotivAPI}/../bin/edk_utils.dll for the Emotiv EPOC driver."
# VERBATIM)
# Copying of DLL files is not needed anymore because of delay load library
ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyEmotivAPI)
ELSE(PATH_EmotivAPI)
......
......@@ -21,14 +21,8 @@ IF(WIN32)
MESSAGE(STATUS " [FAILED] lib gUSBamp")
ENDIF(LIB_GUSBampCAPI)
# Copying the DLL file at postbuild
ADD_CUSTOM_COMMAND(
TARGET ${PROJECT_NAME}-dynamic
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy "${PATH_GUSBampCAPI}/gUSBamp.dll" "${PROJECT_SOURCE_DIR}/bin"
COMMENT " ---> Copying dll file ${PATH_GUSBampCAPI}/gUSBamp.dll for the g.Tec g.USBamp driver."
VERBATIM)
# Copy the DLL file at install
INSTALL(PROGRAMS "${PATH_GUSBampCAPI}/gUSBamp.dll" DESTINATION "bin")
ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyGUSBampCAPI)
ELSE(PATH_GUSBampCAPI)
......
......@@ -21,17 +21,10 @@ IF(WIN32)
MESSAGE(STATUS " [FAILED] lib thinkgear")
ENDIF(LIB_ThinkGearAPI)
# Copy the DLL file at install
INSTALL(PROGRAMS "${PATH_ThinkGearAPI}/thinkgear.dll" DESTINATION "bin")
ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyThinkGearAPI)
# Copying the DLL file at postbuild
ADD_CUSTOM_COMMAND(
TARGET ${PROJECT_NAME}-dynamic
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy "${PATH_ThinkGearAPI}/thinkgear.dll" "${PROJECT_SOURCE_DIR}/bin"
COMMENT " ---> Copying dll file ${PATH_ThinkGearAPI}/thinkgear.dll for the Neurosky MindSet driver."
VERBATIM)
ELSE(PATH_ThinkGearAPI)
MESSAGE(STATUS " FAILED to find a valid ThinkGear API - cmake looked in 'C:/Program Files/MindSet Development Tools/ThinkGear Communications Driver/win32' and 'C:/Program Files (x86)/MindSet Development Tools/ThinkGear Communications Driver/win32'")
ENDIF(PATH_ThinkGearAPI)
......
......@@ -16,14 +16,8 @@ IF(WIN32)
MESSAGE(STATUS " [FAILED] lib FirstAmp")
ENDIF(LIB_USBFirstAmpAPI)
# Copying the DLL file at postbuild
ADD_CUSTOM_COMMAND(
TARGET ${PROJECT_NAME}-dynamic
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy "${PATH_USBFirstAmpAPI}/FirstAmp.dll" "${PROJECT_SOURCE_DIR}/bin"
COMMENT " ---> Copying dll file ${PATH_USBFirstAmpAPI}/FirstAmp.dll for the BrainProducts VAmp driver."
VERBATIM)
# Copy the DLL file at install
INSTALL(PROGRAMS "${PATH_USBFirstAmpAPI}/FirstAmp.dll" DESTINATION "bin")
ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyUSBFirstAmpAPI)
ELSE(PATH_USBFirstAmpAPI)
......
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