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 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. CMAKE_MINIMUM_REQUIRED(VERSION 3.4)
  2. # Here we set a few policies to get rid of warnings on newer cmakes.
  3. # we should update the scripts after upgrading each platform's cmake to 3.x.
  4. cmake_policy(SET CMP0026 OLD)
  5. cmake_policy(SET CMP0043 OLD)
  6. cmake_policy(SET CMP0048 OLD)
  7. cmake_policy(SET CMP0057 NEW) # IF(IN_LIST)
  8. PROJECT(OpenViBE)
  9. # These versions are used by the subprojects by default.
  10. # If you wish to maintain specific version numbers for a subproject, please do so in the projects CMakeLists.txt
  11. SET(OV_GLOBAL_VERSION_MAJOR 3)
  12. SET(OV_GLOBAL_VERSION_MINOR 1)
  13. SET(OV_GLOBAL_VERSION_PATCH 0)
  14. SET(OV_GLOBAL_VERSION_EXTRA "")
  15. SET(OV_GLOBAL_VERSION_STRING "${OV_GLOBAL_VERSION_MAJOR}.${OV_GLOBAL_VERSION_MINOR}.${OV_GLOBAL_VERSION_PATCH}${OV_GLOBAL_VERSION_EXTRA}")
  16. # Sort target into directories for better visualization in IDE
  17. SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
  18. SET(APP_FOLDER Applications)
  19. SET(MODULES_FOLDER Modules)
  20. SET(PLUGINS_FOLDER Plugins)
  21. SET(TESTS_FOLDER Unit-Tests)
  22. SET(VALIDATION_FOLDER Validation-Tests)
  23. SET(DOCUMENTATION_TEMP_DIRECTORY "${CMAKE_INSTALL_PREFIX}/doc-tmp")
  24. MESSAGE(STATUS "Appending compilation flags...")
  25. IF(WIN32)
  26. IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
  27. SET(OV_DEPENDENCIES_PLATFORM_FOLDER_NAME "dependencies_x64")
  28. ELSEIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
  29. SET(OV_DEPENDENCIES_PLATFORM_FOLDER_NAME "dependencies")
  30. ELSE()
  31. SET(OV_DEPENDENCIES_PLATFORM_FOLDER_NAME "dependencies")
  32. ENDIF()
  33. ELSE()
  34. SET(OV_DEPENDENCIES_PLATFORM_FOLDER_NAME "dependencies")
  35. ENDIF()
  36. # Setup knowledge of GNU-style install path variables
  37. INCLUDE("GNUInstallDirs")
  38. if(NOT CMAKE_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio*")
  39. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_INSTALL_PREFIX}/bin" )
  40. set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_INSTALL_PREFIX}/lib" )
  41. foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
  42. string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIGU )
  43. string(CONCAT DIST_ROOT ${DIST_ROOT} $<$<CONFIG:${OUTPUTCONFIGU}>:${CMAKE_INSTALL_PREFIX}/${OUTPUTCONFIG}>)
  44. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIGU} "${CMAKE_INSTALL_PREFIX}/${OUTPUTCONFIG}/bin" )
  45. set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIGU} "${CMAKE_INSTALL_PREFIX}/${OUTPUTCONFIG}/lib" )
  46. endforeach()
  47. set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "OV_CMAKE_PATH_ROOT=\"${DIST_ROOT}\"")
  48. set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "OV_CMAKE_PATH_BIN=\"${DIST_ROOT}/bin\"")
  49. set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "OV_CMAKE_PATH_LIB=\"${DIST_ROOT}/lib\"")
  50. set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "OV_CMAKE_PATH_DATA=\"${DIST_ROOT}/share/openvibe\"")
  51. set(DIST_BINDIR ${DIST_ROOT}/bin)
  52. set(DIST_LIBDIR ${DIST_ROOT}/lib)
  53. set(DIST_INCLUDEDIR ${DIST_ROOT}/include)
  54. set(DIST_DATADIR ${DIST_ROOT}/share)
  55. set(DIST_DOCDIR ${DIST_ROOT}/doc)
  56. set(DIST_DOCTMP ${DIST_ROOT}/doc-tmp)
  57. set(DIST_SYSCONFDIR ${DIST_ROOT}/etc)
  58. elseif(CMAKE_BUILD_TYPE AND OV_PACKAGE)
  59. message(FATAL_ERROR "Package function not implemented (yet) !")
  60. elseif(CMAKE_BUILD_TYPE)
  61. # Add directories that OpenViBE will use to look for its components runtime, unless overridden by environment variables in the launch scripts.
  62. # These defines should only be used in "openvibe/ov_directories.h".
  63. add_definitions(-DOV_CMAKE_PATH_ROOT="${CMAKE_INSTALL_PREFIX}")
  64. add_definitions(-DOV_CMAKE_PATH_BIN="${CMAKE_INSTALL_FULL_BINDIR}")
  65. add_definitions(-DOV_CMAKE_PATH_LIB="${CMAKE_INSTALL_FULL_LIBDIR}")
  66. add_definitions(-DOV_CMAKE_PATH_DATA="${CMAKE_INSTALL_FULL_DATADIR}/openvibe")
  67. set(DIST_ROOT ${CMAKE_INSTALL_PREFIX})
  68. set(DIST_BINDIR ${DIST_ROOT}/bin)
  69. set(DIST_LIBDIR ${DIST_ROOT}/lib)
  70. set(DIST_INCLUDEDIR ${DIST_ROOT}/include)
  71. set(DIST_DATADIR ${DIST_ROOT}/share)
  72. set(DIST_DOCDIR ${DIST_ROOT}/doc)
  73. set(DIST_SYSCONFDIR ${DIST_ROOT}/etc)
  74. else()
  75. message(FATAL_ERROR "Build should specify a type or use a multi-type generator (like Visual Studio)")
  76. endif()
  77. # Create a path usable by Unix shell scripts (used by .sh launchers)
  78. SET(OV_PATH_DEPENCENCY_LIBS "")
  79. FOREACH(TMP ${LIST_DEPENDENCIES_PATH})
  80. LIST(APPEND OV_PATH_DEPENDENCY_LIBS "${TMP}/lib")
  81. ENDFOREACH()
  82. string(REPLACE ";" ":" OV_PATH_PATH_DEPENDENCY_LIBS "${OV_PATH_DEPENDENCY_LIBS}")
  83. if(CMAKE_BUILD_TYPE)
  84. string(TOLOWER ${CMAKE_BUILD_TYPE}"" CMAKE_BUILD_TYPE_LOWER)
  85. find_path(SDK_MODULE_PATH NAMES AddOpenViBESDKComponents.cmake PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES openvibe-sdk-${CMAKE_BUILD_TYPE}/share NO_DEFAULT_PATH) # Find "regular builds
  86. endif()
  87. find_path(SDK_MODULE_PATH NAMES AddOpenViBESDKComponents.cmake PATHS ${OPENVIBE_SDK_PATH} PATH_SUFFIXES share NO_DEFAULT_PATH) # Finds multi-type builds and dev builds
  88. LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake-modules")
  89. if(SDK_MODULE_PATH)
  90. LIST(APPEND CMAKE_MODULE_PATH ${SDK_MODULE_PATH})
  91. endif()
  92. SET(OV_LAUNCHER_SOURCE_PATH "${CMAKE_SOURCE_DIR}/cmake-modules/launchers")
  93. # OpenViBE-specific helper functions that are used by the CMakeLists of the subprojects.
  94. #INCLUDE("OvAddSingleProject")
  95. INCLUDE("OvAddProjects")
  96. INCLUDE("OvInstallLaunchScript")
  97. INCLUDE("OvLinkBoostLib")
  98. INCLUDE("OvPrint")
  99. INCLUDE("OvMessages")
  100. #Install early, so they can be overwritten !
  101. set(INSTALL_SDK 1)
  102. set(INSTALL_DESIGNER 1)
  103. include(FindOVSDK)
  104. include(FindOVDesigner)
  105. # Path to the OpenViBE SDK and designer extracted packages
  106. include(AddOpenViBESDKComponents)
  107. ADD_DEFINITIONS("-DOV_PROJECT_NAME=\"${PROJECT_NAME}\"")
  108. ADD_DEFINITIONS("-DOV_VERSION_MAJOR=\"${OV_GLOBAL_VERSION_MAJOR}\"")
  109. ADD_DEFINITIONS("-DOV_VERSION_MINOR=\"${OV_GLOBAL_VERSION_MINOR}\"")
  110. ADD_DEFINITIONS("-DOV_VERSION_PATCH=\"${OV_GLOBAL_VERSION_PATCH}\"")
  111. SET(OV_CONFIG_SUBDIR OpenVIBE CACHE STRING "Subdirectory under user directory when configuration and logs will be saved")
  112. ADD_DEFINITIONS("-DOV_CONFIG_SUBDIR=\"${OV_CONFIG_SUBDIR}\"")
  113. set(CMAKE_CXX_STANDARD 11)
  114. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  115. IF(WIN32)
  116. # Switch /arch:SSE2 enables vectorization. Remove if your CPU/compiler doesn't support it.
  117. IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
  118. ELSEIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
  119. SET(OV_EIGEN_FLAGS "/arch:SSE2")
  120. ENDIF()
  121. # The following is needed to keep OpenMP from hogging all the cores. Note that this env var works only for VS2013+.
  122. # On VS2010, it may be better to disable OpenMP.
  123. SET(OV_OMP_WAIT_POLICY "PASSIVE")
  124. # Disable /MP if you don't like VS using all the cores for compilation
  125. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4355 /MP ${OV_EIGEN_FLAGS}")
  126. ADD_DEFINITIONS("-DNOMINMAX -DBOOST_ALL_NO_LIB")
  127. # At least Windows Vista target - if you target Windows XP (0x0501), some components may not compile
  128. ADD_DEFINITIONS("-D_WIN32_WINNT=0x0600")
  129. # Find out the compiler version, deps may use this
  130. SET(MSVC_SERVICE_PACK "unknown")
  131. # MESSAGE(STATUS "st ${CMAKE_CXX_COMPILER_VERSION}")
  132. IF(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "18.0.0")
  133. SET(MSVC_SERVICE_PACK "vc120")
  134. ELSEIF(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "17.0.0")
  135. SET(MSVC_SERVICE_PACK "vc110")
  136. ELSEIF(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "16.0.0")
  137. SET(MSVC_SERVICE_PACK "vc100")
  138. ENDIF()
  139. STRING(REGEX MATCH "vc120.*" MSVC_VER120 ${MSVC_SERVICE_PACK})
  140. IF(MSVC_VER120)
  141. # Boost 1.55 asio causes several compiler warnings on VS2013 we cannot do much about. try removing the following when boost is upgraded.
  142. ADD_DEFINITIONS("-D_WINSOCK_DEPRECATED_NO_WARNINGS")
  143. # If OpenMP is available, using it will allow Eigen to use multiple cores in matrix math. Only used on VS120,
  144. # as VS100 allocates the cores too aggressively when OpenMP is enabled.
  145. INCLUDE("FindOpenMP")
  146. IF(OPENMP_FOUND)
  147. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
  148. ENDIF()
  149. ENDIF()
  150. MESSAGE(STATUS "MSVC version is ${MSVC_SERVICE_PACK}")
  151. SET(OV_WIN32_BOOST_VERSION "1_58")
  152. ELSEIF(UNIX)
  153. # If OpenMP is available, using it will allow Eigen to use multiple cores in matrix math.
  154. INCLUDE("FindOpenMP")
  155. IF(OPENMP_FOUND)
  156. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
  157. ENDIF()
  158. # Switch -msse2 enables vectorization. Remove if your CPU/compiler doesn't support it.
  159. SET(OV_EIGEN_FLAGS "-msse2")
  160. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ${OV_EIGEN_FLAGS}")
  161. # This ENV var is needed to locate our custom IT++ on Linux
  162. SET(ENV{PKG_CONFIG_PATH} "${LIST_DEPENDENCIES_PATH}/lib/pkgconfig")
  163. if (${CMAKE_SYSTEM_PROCESSOR} MATCHES i386|i586|i686)
  164. set ( BIT_MODE "32")
  165. else ()
  166. set ( BIT_MODE "64")
  167. endif ()
  168. if(EXISTS "/etc/debian_version")
  169. set (PLATFORM "Debian")
  170. ADD_DEFINITIONS("-DTARGET_OS_Linux_Debian")
  171. endif(EXISTS "/etc/debian_version")
  172. if(EXISTS "/etc/fedora-release")
  173. set (PLATFORM "Fedora")
  174. ADD_DEFINITIONS("-DTARGET_OS_Linux_Fedora")
  175. endif(EXISTS "/etc/fedora-release")
  176. ELSE()
  177. MESSAGE(WARNING "Warning: unknown platform")
  178. ENDIF()
  179. # IF(NOT CMAKE_BUILD_TYPE)
  180. # MESSAGE(STATUS "Setting default build type to Release")
  181. # SET(CMAKE_BUILD_TYPE "Release")
  182. # ENDIF()
  183. FUNCTION(SET_BUILD_PLATFORM)
  184. IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
  185. ADD_DEFINITIONS(-DTARGET_ARCHITECTURE_x64)
  186. SET(PLATFORM_TARGET "x64" PARENT_SCOPE)
  187. ELSEIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
  188. ADD_DEFINITIONS(-DTARGET_ARCHITECTURE_i386)
  189. SET(PLATFORM_TARGET "x86" PARENT_SCOPE)
  190. ELSE()
  191. ADD_DEFINITIONS(-DTARGET_ARCHITECTURE_Unknown)
  192. SET(PLATFORM_TARGET "unknown" PARENT_SCOPE)
  193. ENDIF()
  194. IF(WIN32)
  195. ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
  196. ADD_DEFINITIONS(-DTARGET_OS_Windows)
  197. ADD_DEFINITIONS(-DTARGET_COMPILER_VisualStudio)
  198. ELSEIF(APPLE)
  199. ADD_DEFINITIONS(-fnon-call-exceptions)
  200. ADD_DEFINITIONS(-DTARGET_OS_MacOS)
  201. ADD_DEFINITIONS(-DTARGET_COMPILER_LLVM)
  202. ELSEIF(UNIX)
  203. # ADD_DEFINITIONS(-fvisibility=hidden) # This flag should be present... man gcc
  204. ADD_DEFINITIONS(-fnon-call-exceptions)
  205. ADD_DEFINITIONS(-DTARGET_OS_Linux)
  206. ADD_DEFINITIONS(-DTARGET_COMPILER_GCC)
  207. ENDIF()
  208. ENDFUNCTION()
  209. # In extras/ we assume that everything is built onto the same platform.
  210. # It is very error prone to leave this to the modules.
  211. SET_BUILD_PLATFORM()
  212. # Print the used compilation parameters (for transparency)
  213. GET_DIRECTORY_PROPERTY(TMP_DEFINITIONS COMPILE_DEFINITIONS)
  214. MESSAGE(STATUS "Compilation flags used at source root: ")
  215. MESSAGE(STATUS " COMPILE_DEFINITIONS = '${TMP_DEFINITIONS}'")
  216. MESSAGE(STATUS " CMAKE_CXX_FLAGS = '${CMAKE_CXX_FLAGS}'")
  217. MESSAGE(STATUS " CMAKE_CXX_FLAGS_RELEASE = '${CMAKE_CXX_FLAGS_RELEASE}'")
  218. MESSAGE(STATUS " CMAKE_CXX_FLAGS_DEBUG = '${CMAKE_CXX_FLAGS_DEBUG}'")
  219. # if want to compile tests, use the following.
  220. SET(OV_COMPILE_TESTS "true")
  221. # if you don't want an Ogre dependency, use the following. All 3D visualizations and 3D apps will be unavailable. The result will compile faster.
  222. # SET(OV_DISABLE_OGRE "true")
  223. # if you don't want a GTK dependency, set the following. Note that most applications including Acquisition Server and Designer will NOT be built.
  224. # This option is mostly of interest to hackers who are interested in using a minimal OpenViBE kernel in their own projects.
  225. # SET(OV_DISABLE_GTK "true")
  226. # By setting SKIP[_FOLDER]* you can skip a subtree (example: SKIP_A_B_C skips folder a/b/c and all its subfolders if any)
  227. # Skip building documentation
  228. SET(SKIP_DOCUMENTATION "1")
  229. # Only build the python plugin for one version of python.
  230. # On windows, it can work with both, with the right configuration.
  231. # On linux, compilation is easier, but runtime is not possible with both versions. Python.h is not namespaced and
  232. # both plugins end up using the same Python API version (e.g. Python3 plugin calling python2 API).
  233. SET(SKIP_CONTRIB_PLUGINS_PROCESSING_PYTHON2 "1")
  234. #SET(SKIP_CONTRIB_PLUGINS_PROCESSING_PYTHON3 "1")
  235. # Skipping demos can speed up compilation a lot, if you don't need them
  236. #SET(SKIP_APPLICATIONS_DEMOS "1")
  237. #SET(SKIP_CONTRIB_APPLICATIONS "1")
  238. IF(UNIX)
  239. # On Linux, the presence of matlab plugin .so can cause crashes in Simple DSP box as the two may use different versions of boost which are
  240. # then wrongly exposed to the other party due to the dlopen() flag RTLD_GLOBAL. Unfortunately this flag is needed or the python plugin
  241. # imports no longer work... You may enable the Matlab plugin compilation and possibly set the flag to RTLD_LOCAL in ovCKernelLoader.cpp,
  242. # but be aware of the consequences.
  243. MESSAGE(STATUS "Note: Disabling Matlab plugin compilation by default")
  244. SET(SKIP_PLUGINS_PROCESSING_MATLAB "1")
  245. ENDIF()
  246. #SET(SKIP_MODULES_AUTOMATON "1")
  247. #SET(SKIP_MODULES_EBML "1")
  248. #SET(SKIP_MODULES_FS "1")
  249. #SET(SKIP_MODULES_SOCKET "1")
  250. #SET(SKIP_MODULES_STREAM "1")
  251. #SET(SKIP_MODULES_SYSTEM "1")
  252. #SET(SKIP_MODULES_XML "1")
  253. #SET(SKIP_APPLICATIONS_PLATFORM_ACQUISITION-SERVER "1")
  254. #SET(SKIP_PLUGINS_PROCESSING_EXAMPLES "1")
  255. # FIXME CERT > From OpenViBE designer repo in the future
  256. # Designer is currently in another repository; taken from there
  257. SET(SKIP_APPLICATIONS_PLATFORM_DESIGNER "0")
  258. SET(SKIP_APPLICATIONS_EXAMPLES_CONVERT "0") # Convert depends on Designer
  259. # If you wish you can uncomment the next line and add a file with additional information called OVBranches.cmake to
  260. # the cmake-modules folder. It makes modifying this very CMake file easier.
  261. #INCLUDE("OVCustomSettings")
  262. # a list of all project which will be filled by the directory traversal. This is needed to generate the documentation.
  263. SET_PROPERTY(GLOBAL PROPERTY OV_PROP_CURRENT_PROJECTS "")
  264. SET_PROPERTY(GLOBAL PROPERTY OV_PROP_CURRENT_PROJECTS_BUILD_DIR "")
  265. # Used by the various Find* scripts to locate OpenViBE modules
  266. # Used by the various Find* scripts to locate OpenViBE modules
  267. SET(OV_BASE_DIR ${CMAKE_SOURCE_DIR})
  268. # needed for making visual studio projects when this script is called without CMAKE_BUILD_TYPE
  269. SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG "TARGET_BUILDTYPE_Debug")
  270. SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE "TARGET_BUILDTYPE_Release")
  271. SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO "TARGET_BUILDTYPE_Release")
  272. SET(CMAKE_INSTALL_FULL_DOCDIR "${CMAKE_INSTALL_FULL_BINDIR}/../doc/html")
  273. ADD_SUBDIRECTORY("build-tool/")
  274. # Traverse these directories and build their components
  275. ADD_SUBDIRECTORY("modules/")
  276. ADD_SUBDIRECTORY("plugins/")
  277. ADD_SUBDIRECTORY("applications/")
  278. ADD_SUBDIRECTORY("externals/")
  279. ADD_SUBDIRECTORY("contrib/")
  280. ADD_SUBDIRECTORY("documentation/") # needs to be the last since it uses the list of collected projects
  281. #add dependency to plugin inspector to the documentation
  282. IF(openvibe-documentation)
  283. ADD_DEPENDENCIES(openvibe-documentation openvibe-plugin-inspector)
  284. ENDIF(openvibe-documentation)
  285. # 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.
  286. IF(WIN32)
  287. FIND_PATH(OV_DEPENDENCY_CMD_PATH windows-dependencies.cmd PATHS ${LIST_DEPENDENCIES_PATH} NO_DEFAULT_PATH)
  288. IF(NOT OV_DEPENDENCY_CMD_PATH)
  289. MESSAGE(FATAL_ERROR "Dependency installer should have generated 'windows-dependencies.cmd'. Looked from ${LIST_DEPENDENCIES_PATH}.")
  290. ENDIF()
  291. INSTALL(PROGRAMS ${OV_DEPENDENCY_CMD_PATH}/windows-dependencies.cmd DESTINATION ${DIST_BINDIR} RENAME "openvibe-set-env.cmd")
  292. ENDIF(WIN32)
  293. # ----------------------
  294. # Generate 'external application launcher' script
  295. # ----------------------
  296. IF(WIN32)
  297. SET(OV_EXT_CMD_FILE "openvibe-external-application-launcher.cmd")
  298. ELSEIF(UNIX)
  299. SET(OV_EXT_CMD_FILE "openvibe-external-application-launcher")
  300. ENDIF()
  301. CONFIGURE_FILE("${OV_LAUNCHER_SOURCE_PATH}/${OV_EXT_CMD_FILE}-base" "${CMAKE_CURRENT_BINARY_DIR}/${OV_EXT_CMD_FILE}")
  302. INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${OV_EXT_CMD_FILE} DESTINATION ${DIST_BINDIR})
  303. # create the openvibe-ogre-plugins.cfg file for Ogre on UNIX
  304. IF(UNIX)
  305. execute_process(COMMAND pkg-config --variable=plugindir OGRE OUTPUT_VARIABLE OGRE3D_PLUGIN_PATH)
  306. CONFIGURE_FILE("${OV_LAUNCHER_SOURCE_PATH}/openvibe-ogre-plugins.cfg-base" "${CMAKE_CURRENT_BINARY_DIR}/openvibe-ogre-plugins.cfg")
  307. INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/openvibe-ogre-plugins.cfg DESTINATION ${DIST_DATADIR}/openvibe)
  308. ENDIF()
  309. SET(INCLUDED_OV_SDK_COMPONENTS DEPENDENCIES ALLPLUGINS)
  310. INCLUDE("AddOpenViBESDKComponents")
  311. configure_file(test/CTestTestfile.cmake . @ONLY)