Commit 6e7dde15 authored by Jussi Lindgren's avatar Jussi Lindgren

Whole build system:

 * WARNING: this commit is likely to break something. Please let us know what and where. 
 * NOTE:  It is important to clean your source tree of non-versioned files before re-building this new revision of OpenViBE. Do a fresh checkout for simplicity. 
 * A lot of functionality has been moved to portable CMake code from the platform specific scripts
 * Dependencies are explicitly handled with cmakelists. Calling Find* for OpenViBE component now specifies an explicit lib dependency.
 * Correct visual studio project generation, tested on VC 2010 Express. Use win32-generate-vc-proj.cmd to generate a project, and win32-launch-vc.cmd to start VS with env vars set. You may have to tinker the launched .exe for other versions of VS.
 * 'Openvibe style branching' is still supported
 * Includes are no longer copied before they're used. This helps visual studio development (i.e. always edit/locate the real source header)	
 * Tested that applications still run on linux mint & win7. Also tested a few scenarios.
 * ${OpenViBE_blahblah} environment variables have been largely removed. If you need to have source tree all over your filesystem, replace the folders in question with symbolic links?
 * Build should be completely 'out-of-source' : everything that build produces should now be written under local-tmp/ and dist/, no mods to the source tree.
 * Cmake install target now takes care of file copying to dist/
 * We still have separate build scripts for the two platforms. But now these mainly set some environment variables and call CMake. We can't launch vsvars32.bat from inside cmake it seems, so at least a tiny win script needs to be present to launch cmake and set the dependencies up.
 * Parts of Openvibe can be built as Debug while rest is built as release by either toggling configuration manager config for the project in Visual Studio, or walking to the desired directory in local-tmp and hitting 'nmake install' or 'make install' there
 * Application launch scripts are now built from a few templates both on win and linux.
 * Existing WIP-branches have not been converted to the new build. If you really need one converted, let us know.

git-svn-id: svn://scm.gforge.inria.fr/svn/openvibe@3406 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f
parent f5da92ff
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(OpenVIBE)
MESSAGE(STATUS "Setting CMake flags...")
IF(WIN32)
SET(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /wd4355")
ELSEIF(UNIX)
SET(CMAKE_CXX_FLAGS "-Wall")
ELSE(WIN32)
MESSAGE(STATUS "Warning: unknown platform")
ENDIF(WIN32)
# if no specific branch has been given, 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.
# 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
# Some recognized branch variables
#SET(OV_BRANCH_OPENVIBE "branches/mybranch")
#SET(OV_BRANCH_KERNEL "branches/mybranch")
#SET(OV_BRANCH_MODULES_AUTOMATON "branches/mybranch")
#SET(OV_BRANCH_MODULES_EBML "branches/mybranch")
#SET(OV_BRANCH_MODULES_FS "branches/mybranch")
#SET(OV_BRANCH_MODULES_SOCKET "branches/mybranch")
#SET(OV_BRANCH_MODULES_STREAM "branches/mybranch")
#SET(OV_BRANCH_MODULES_SYSTEM "branches/mybranch")
#SET(OV_BRANCH_MODULES_XML "branches/mybranch")
#SET(OV_BRANCH_TOOLKIT "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_ACQUISITION "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_CLASSIFICATION "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_CLASSIFICATION-GPL "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_FEATURE-EXTRACTION "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_FILE-IO "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_MATLAB "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_PYTHON "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_SAMPLES "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_SIGNAL-PROCESSING "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_SIGNAL-PROCESSING-GPL "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_SIMPLE-VISUALISATION "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_STIMULATION "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_STREAM-CODECS "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_STREAMING "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_TOOLS "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_TURBOFIELDTRIP "branches/mybranch")
#SET(OV_BRANCH_PLUGINS_VRPN "branches/mybranch")
#SET(OV_BRANCH_SCENARIOS "branches/mybranch")
#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_PLUGIN-INSPECTOR "branches/mybranch")
#SET(OV_BRANCH_APPLICATIONS_SKELETON-GENERATOR "branches/mybranch")
#SET(OV_BRANCH_APPLICATIONS_SSVEP-DEMO "branches/mybranch")
#SET(OV_BRANCH_APPLICATIONS_VR-DEMO "branches/mybranch")
#SET(OV_BRANCH_APPLICATIONS_VRPN-SIMULATOR "branches/mybranch")
#SET(OV_BRANCH_DOCUMENTATION "branches/mybranch")
# 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.
SET_PROPERTY(GLOBAL PROPERTY OV_PROP_CURRENT_PROJECTS "")
# needed for making visual studio projects when this script is called without CMAKE_BUILD_TYPE
SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG "TARGET_BUILDTYPE_Debug")
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.
INCLUDE("OvAddSingleProject")
INCLUDE("OvAddProjects")
INCLUDE("OvInstallLaunchScript")
ADD_SUBDIRECTORY("openvibe/")
ADD_SUBDIRECTORY("openvibe-kernel-omk/")
ADD_SUBDIRECTORY("openvibe-modules/")
ADD_SUBDIRECTORY("openvibe-toolkit/")
ADD_SUBDIRECTORY("openvibe-plugins/")
ADD_SUBDIRECTORY("openvibe-scenarios/")
ADD_SUBDIRECTORY("openvibe-applications/")
ADD_SUBDIRECTORY("openvibe-externals/")
ADD_SUBDIRECTORY("openvibe-documentation/") # needs to be the last since it uses the list of collected projects
# create the appropriate directory tree to dist/ on install, some required components like log/ may not appear otherwise
INSTALL(CODE "FILE(MAKE_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\")")
INSTALL(CODE "FILE(MAKE_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/bin\")")
INSTALL(CODE "FILE(MAKE_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/include\")")
INSTALL(CODE "FILE(MAKE_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/lib\")")
INSTALL(CODE "FILE(MAKE_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/share\")")
INSTALL(CODE "FILE(MAKE_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/etc\")")
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.
IF(WIN32)
INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/win32-dependencies.cmd DESTINATION ${CMAKE_INSTALL_PREFIX}/bin RENAME "OpenViBE-set-env.cmd")
ENDIF(WIN32)
IF(UNIX)
INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/linux-dependencies DESTINATION ${CMAKE_INSTALL_PREFIX}/bin RENAME "OpenViBE-set-env.sh")
ENDIF(UNIX)
# ----------------------
# Generate 'external application launcher' script
# ----------------------
IF(WIN32)
SET(CMD_FILE "OpenViBE-external-application-launcher.cmd")
ENDIF(WIN32)
IF(UNIX)
SET(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/")
......@@ -5,7 +5,8 @@
|Introduction|
This document explains how to build the platform from sources. More up-to-date information may be available at
This document explains how to build the OpenViBE platform from the sources.
More up-to-date information may be available at
http://openvibe.inria.fr/build-instructions/
......@@ -16,52 +17,105 @@ organisation.
|Build.target|
OpenViBE should compile on x86 / x86_64 architecture running Microsoft Windows 2k/XP/Vista/7
with Visual C++ 2008 or 2010 Express Edition (take care of having the up-to-date platform SDK
from Microsoft installed).
Windows: OpenViBE should compile on x86 / x86_64 architecture running Microsoft
Windows 2k/XP/Vista/7 with Visual C++ 2008 or 2010 Express Edition (take care
of having the up-to-date platform SDK from Microsoft installed).
OpenViBE should compile on x86 / x86_64 architectures running Linux with gcc 4.*
Linux: OpenViBE should compile on x86 / x86_64 architectures running Linux with gcc 4.*
Please consider that trying to compile OpenViBE on other hardware/OS/compiler
is experimental and has not been tested. If you wish to try
and get OpenViBE to run on other hardware/OS/compilers, your efforts are welcome
is experimental and has not been tested. If you wish to try and get OpenViBE
to run on other hardware/OS/compilers, your efforts are welcome
but you should not expect to get support on the short term.
|Prerequesite.dependencies|
|Building on Windows|
In order to build the software, one must install several dependencies.
1. Install dependencies
In order to build the software, you must install several dependencies.
This may be done using the provided installation scripts which will automatically
set up your environment. Run either of these while *inside* the scripts/ directory.
set up your environment. Run the following *inside* the scripts/ directory:
<win32-install_dependencies> installs the dependencies under Windows.
The Windows installer uses prebuilt packages and is quite fast.
2. Prepare the environment
The build process uses many environment variables. The 'scripts' directory
contains the necessary files to build the whole platform and plugins.
The <win32-init_env_command-skeleton> file is copied to make an initial version
of the actually used script <win32-init_env_command>. However, you may
have to tune the scripts by hand due to installation specifics such as Visual
Studio paths and so on... Script tweaking may be required here ;)
3a. Build using NMake
If you want to build all projects at once, you can use the <win32-build> script.
The script calls <win32-init_env_command>, which must have been properly
configured.
3b. Build using Visual Studio
Use <win32-generate-vc-proj> in scripts\ directory to generate a Visual Studio
solution to "local-tmp\visual\". The script calls <win32-init_env_command>,
which must have been properly configured.
<win32-install_dependencies> installs dependencies under Windows and
<linux-install_dependencies> installs them under Linux.
Script <win32-launch-vc> can then be used to launch Visual Studio 2010 Express
while taking care that all the environment variables have been set.
The Windows installer processes prebuilt packages and therefore is quite fast.
Note the following when using Visual Studio with OpenViBE:
- When launching Visual Studio, the OpenViBE environment variables must have
already been set (as by <win32-launch-vc>)
- Always compile the INSTALL target to get everything copied under "dist\". This
is required so that the compiled OpenViBE applications can find the DLL files.
- When debugging an OpenViBE executable in Visual Studio, you must set the
correct Properties->Debugging->Working Directory by finding "dist\bin\" with browse.
- All Visual Studio projects are created by CMake, so any changes to the project
configurations should be made to CMake scripts.
- If you want to add files to the build tree, delete "local-tmp\visual\CMakeCache.txt"
and run the <win32-generate-vc-proj> again.
4. If you made it this far, congratulations : you should now have OpenViBE working,
and the freshly built OpenViBE in "dist\".
|Building on Linux|
1. Install dependencies
In order to build the software, one must install several dependencies.
This may be done using the provided installation scripts which will automatically
set up your environment. Run the following *inside* the scripts/ directory:
<linux-install_dependencies> installs dependencies under Linux.
The Linux installer processes a few source packages and builds them from scratch.
One should be able to install each dependency in a local directory without requiring
root access and without using any package manager such as apt-get or yum.
However, it is safer to use native packages.
|Preparing.environment|
2. Prepare the environment
The build process uses many environment variables. The 'script' directory
contains the necessary files to build the whole platform and plugins.
The <linux-init_env_command-skeleton> and <win32-init_env_command-skeleton> files
are copied to make initial versions of the actually used scripts <linux-init_env_command>
and <win32-init_env_command>. However, you may have to tune the scripts by hand
due to installation specifics such as Visual Studio paths and so on...
The <linux-init_env_command-skeleton> file is copied to make initial version
of the actually used script <linux-init_env_command>. However, you may have
to tune the scripts by hand due to installation specifics...
Script tweaking may be required here ;)
|Building.the.platform|
3. Build the platform
If you want to build all projects at once, you can use the <linux-build> or
<win32-build> scripts. Both scripts call the appropriate
<init_env_command>, which must have been properly configured.
If you want to build all projects at once, you can use the <linux-build>
scripts. The script calls the appropriate <init_env_command>, which must
have been properly configured.
On Linux, the <linux-test> script will launch the most interesting applications for you.
If you made it this far, congratulations : you should now have OpenViBE working!
4. If you made it this far, congratulations : you should now have OpenViBE working,
and the freshly built OpenViBE in "dist/".
|Contribution.rules|
......
......@@ -15,18 +15,19 @@ ELSE(DYNAMIC_LINK_OPENVIBE)
SET(OPENVIBE_LINKING static)
ENDIF(DYNAMIC_LINK_OPENVIBE)
FIND_PATH(PATH_OPENVIBE include/openvibe/ov_all.h PATHS $ENV{OpenViBE})
IF(OV_BRANCH_OPENVIBE)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe/${OV_BRANCH_OPENVIBE})
ELSE(OV_BRANCH_OPENVIBE)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe/${OV_TRUNK})
ENDIF(OV_BRANCH_OPENVIBE)
FIND_PATH(PATH_OPENVIBE src/openvibe/ov_all.h PATHS ${SRC_DIR})
IF(PATH_OPENVIBE)
MESSAGE(STATUS " Found OpenViBE...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE}/include)
FIND_LIBRARY(LIB_OPENVIBE OpenViBE-${OPENVIBE_LINKING} PATH ${PATH_OPENVIBE}/lib)
IF(LIB_OPENVIBE)
MESSAGE(STATUS " [ OK ] lib ${LIB_OPENVIBE}")
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${LIB_OPENVIBE})
ELSE(LIB_OPENVIBE)
MESSAGE(STATUS " [FAILED] lib OpenViBE-${OPENVIBE_LINKING}")
ENDIF(LIB_OPENVIBE)
INCLUDE_DIRECTORIES(${PATH_OPENVIBE}/src/)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic OpenViBE-${OPENVIBE_LINKING})
ADD_DEFINITIONS(-DTARGET_HAS_OpenViBE)
ELSE(PATH_OPENVIBE)
MESSAGE(STATUS " FAILED to find OpenViBE...")
......
......@@ -15,17 +15,18 @@ ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_AUTOMATON)
SET(OPENVIBE_MODULE_AUTOMATON_LINKING static)
ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_AUTOMATON)
FIND_PATH(PATH_OPENVIBE_MODULES_AUTOMATON include/automaton/defines.h PATHS $ENV{OpenViBE_modules}/automaton $ENV{OpenViBE_module_automaton})
IF(OV_BRANCH_MODULES_AUTOMATON)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/automaton/${OV_BRANCH_MODULES_AUTOMATON})
ELSE(OV_BRANCH_MODULES_AUTOMATON)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/automaton/${OV_TRUNK})
ENDIF(OV_BRANCH_MODULES_AUTOMATON)
FIND_PATH(PATH_OPENVIBE_MODULES_AUTOMATON src/automaton/defines.h PATHS ${SRC_DIR})
IF(PATH_OPENVIBE_MODULES_AUTOMATON)
MESSAGE(STATUS " Found OpenViBE module Automaton...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_AUTOMATON}/include)
FIND_LIBRARY(LIB_OPENVIBE_MODULE_AUTOMATON OpenViBE-module-Automaton-${OPENVIBE_MODULE_AUTOMATON_LINKING} PATHS ${PATH_OPENVIBE_MODULES_AUTOMATON}/lib)
IF(LIB_OPENVIBE_MODULE_AUTOMATON)
MESSAGE(STATUS " [ OK ] lib ${LIB_OPENVIBE_MODULE_AUTOMATON}")
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${LIB_OPENVIBE_MODULE_AUTOMATON})
ELSE(LIB_OPENVIBE_MODULE_AUTOMATON)
MESSAGE(STATUS " [FAILED] lib OpenViBE-module-Automaton-${OPENVIBE_MODULE_AUTOMATON_LINKING}")
ENDIF(LIB_OPENVIBE_MODULE_AUTOMATON)
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_AUTOMATON}/src/)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic OpenViBE-module-Automaton-${OPENVIBE_MODULE_AUTOMATON_LINKING})
ADD_DEFINITIONS(-DTARGET_HAS_Automaton)
ELSE(PATH_OPENVIBE_MODULES_AUTOMATON)
......
......@@ -15,17 +15,18 @@ ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_EBML)
SET(OPENVIBE_MODULE_EBML_LINKING static)
ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_EBML)
FIND_PATH(PATH_OPENVIBE_MODULES_EBML include/ebml/defines.h PATHS $ENV{OpenViBE_modules}/ebml $ENV{OpenViBE_module_ebml})
IF(OV_BRANCH_MODULES_EBML)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/ebml/${OV_BRANCH_MODULES_EBML})
ELSE(OV_BRANCH_MODULES_EBML)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/ebml/${OV_TRUNK})
ENDIF(OV_BRANCH_MODULES_EBML)
FIND_PATH(PATH_OPENVIBE_MODULES_EBML src/ebml/defines.h PATHS ${SRC_DIR})
IF(PATH_OPENVIBE_MODULES_EBML)
MESSAGE(STATUS " Found OpenViBE module EBML...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_EBML}/include)
FIND_LIBRARY(LIB_OPENVIBE_MODULE_EBML OpenViBE-module-EBML-${OPENVIBE_MODULE_EBML_LINKING} PATHS ${PATH_OPENVIBE_MODULES_EBML}/lib)
IF(LIB_OPENVIBE_MODULE_EBML)
MESSAGE(STATUS " [ OK ] lib ${LIB_OPENVIBE_MODULE_EBML}")
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${LIB_OPENVIBE_MODULE_EBML})
ELSE(LIB_OPENVIBE_MODULE_EBML)
MESSAGE(STATUS " [FAILED] lib OpenViBE-module-EBML-${OPENVIBE_MODULE_EBML_LINKING}")
ENDIF(LIB_OPENVIBE_MODULE_EBML)
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_EBML}/src/)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic OpenViBE-module-EBML-${OPENVIBE_MODULE_EBML_LINKING})
ADD_DEFINITIONS(-DTARGET_HAS_EBML)
ELSE(PATH_OPENVIBE_MODULES_EBML)
......
......@@ -15,17 +15,18 @@ ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_FS)
SET(OPENVIBE_MODULE_FS_LINKING static)
ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_FS)
FIND_PATH(PATH_OPENVIBE_MODULES_FS include/fs/defines.h PATHS $ENV{OpenViBE_modules}/fs $ENV{OpenViBE_module_fs})
IF(OV_BRANCH_MODULES_FS)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/fs/${OV_BRANCH_MODULES_FS})
ELSE(OV_BRANCH_MODULES_FS)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/fs/${OV_TRUNK})
ENDIF(OV_BRANCH_MODULES_FS)
FIND_PATH(PATH_OPENVIBE_MODULES_FS src/fs/defines.h PATHS ${SRC_DIR})
IF(PATH_OPENVIBE_MODULES_FS)
MESSAGE(STATUS " Found OpenViBE module FS...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_FS}/include)
FIND_LIBRARY(LIB_OPENVIBE_MODULE_FS OpenViBE-module-FS-${OPENVIBE_MODULE_FS_LINKING} PATHS ${PATH_OPENVIBE_MODULES_FS}/lib)
IF(LIB_OPENVIBE_MODULE_FS)
MESSAGE(STATUS " [ OK ] lib ${LIB_OPENVIBE_MODULE_FS}")
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${LIB_OPENVIBE_MODULE_FS})
ELSE(LIB_OPENVIBE_MODULE_FS)
MESSAGE(STATUS " [FAILED] lib OpenViBE-module-FS-${OPENVIBE_MODULE_FS_LINKING}")
ENDIF(LIB_OPENVIBE_MODULE_FS)
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_FS}/src/)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic OpenViBE-module-FS-${OPENVIBE_MODULE_FS_LINKING})
ADD_DEFINITIONS(-DTARGET_HAS_FS)
ELSE(PATH_OPENVIBE_MODULES_FS)
......
......@@ -15,17 +15,18 @@ ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_SOCKET)
SET(OPENVIBE_MODULE_SOCKET_LINKING static)
ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_SOCKET)
FIND_PATH(PATH_OPENVIBE_MODULES_SOCKET include/socket/defines.h PATHS $ENV{OpenViBE_modules}/socket $ENV{OpenViBE_module_socket})
IF(OV_BRANCH_MODULES_SOCKET)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/socket/${OV_BRANCH_MODULES_SOCKET})
ELSE(OV_BRANCH_MODULES_SOCKET)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/socket/${OV_TRUNK})
ENDIF(OV_BRANCH_MODULES_SOCKET)
FIND_PATH(PATH_OPENVIBE_MODULES_SOCKET src/socket/defines.h PATHS ${SRC_DIR})
IF(PATH_OPENVIBE_MODULES_SOCKET)
MESSAGE(STATUS " Found OpenViBE module Socket...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_SOCKET}/include)
FIND_LIBRARY(LIB_OPENVIBE_MODULE_SOCKET OpenViBE-module-Socket-${OPENVIBE_MODULE_SOCKET_LINKING} PATHS ${PATH_OPENVIBE_MODULES_SOCKET}/lib)
IF(LIB_OPENVIBE_MODULE_SOCKET)
MESSAGE(STATUS " [ OK ] lib ${LIB_OPENVIBE_MODULE_SOCKET}")
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${LIB_OPENVIBE_MODULE_SOCKET})
ELSE(LIB_OPENVIBE_MODULE_SOCKET)
MESSAGE(STATUS " [FAILED] lib OpenViBE-module-Socket-${OPENVIBE_MODULE_SOCKET_LINKING}")
ENDIF(LIB_OPENVIBE_MODULE_SOCKET)
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_SOCKET}/src/)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic OpenViBE-module-Socket-${OPENVIBE_MODULE_SOCKET_LINKING})
ADD_DEFINITIONS(-DTARGET_HAS_Socket)
ELSE(PATH_OPENVIBE_MODULES_SOCKET)
......
......@@ -15,17 +15,18 @@ ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_STREAM)
SET(OPENVIBE_MODULE_STREAM_LINKING static)
ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_STREAM)
FIND_PATH(PATH_OPENVIBE_MODULES_STREAM include/stream/defines.h PATHS $ENV{OpenViBE_modules}/stream $ENV{OpenViBE_module_stream})
IF(OV_BRANCH_MODULES_STREAM)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/stream/${OV_BRANCH_MODULES_STREAM})
ELSE(OV_BRANCH_MODULES_STREAM)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/stream/${OV_TRUNK})
ENDIF(OV_BRANCH_MODULES_STREAM)
FIND_PATH(PATH_OPENVIBE_MODULES_STREAM src/stream/defines.h PATHS $ENV{OpenViBE_base}/openvibe-modules/stream)
IF(PATH_OPENVIBE_MODULES_STREAM)
MESSAGE(STATUS " Found OpenViBE module Stream...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_STREAM}/include)
FIND_LIBRARY(LIB_OPENVIBE_MODULE_STREAM OpenViBE-module-Stream-${OPENVIBE_MODULE_STREAM_LINKING} PATHS ${PATH_OPENVIBE_MODULES_STREAM}/lib)
IF(LIB_OPENVIBE_MODULE_STREAM)
MESSAGE(STATUS " [ OK ] lib ${LIB_OPENVIBE_MODULE_STREAM}")
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${LIB_OPENVIBE_MODULE_STREAM})
ELSE(LIB_OPENVIBE_MODULE_STREAM)
MESSAGE(STATUS " [FAILED] lib OpenViBE-module-Stream-${OPENVIBE_MODULE_STREAM_LINKING}")
ENDIF(LIB_OPENVIBE_MODULE_STREAM)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic OpenViBE-module-Stream-${OPENVIBE_MODULE_STREAM_LINKING})
ADD_DEFINITIONS(-DTARGET_HAS_Stream)
ELSE(PATH_OPENVIBE_MODULES_STREAM)
......
......@@ -15,17 +15,19 @@ ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_SYSTEM)
SET(OPENVIBE_MODULE_SYSTEM_LINKING static)
ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_SYSTEM)
FIND_PATH(PATH_OPENVIBE_MODULES_SYSTEM include/system/defines.h PATHS $ENV{OpenViBE_modules}/system $ENV{OpenViBE_module_system})
IF(OV_BRANCH_MODULES_SYSTEM)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/system/${OV_BRANCH_MODULES_SYSTEM})
ELSE(OV_BRANCH_MODULES_SYSTEM)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/system/${OV_TRUNK})
ENDIF(OV_BRANCH_MODULES_SYSTEM)
FIND_PATH(PATH_OPENVIBE_MODULES_SYSTEM src/system/defines.h PATHS ${SRC_DIR})
IF(PATH_OPENVIBE_MODULES_SYSTEM)
MESSAGE(STATUS " Found OpenViBE module System...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_SYSTEM}/include)
FIND_LIBRARY(LIB_OPENVIBE_MODULE_SYSTEM OpenViBE-module-System-${OPENVIBE_MODULE_SYSTEM_LINKING} PATHS ${PATH_OPENVIBE_MODULES_SYSTEM}/lib)
IF(LIB_OPENVIBE_MODULE_SYSTEM)
MESSAGE(STATUS " [ OK ] lib ${LIB_OPENVIBE_MODULE_SYSTEM}")
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${LIB_OPENVIBE_MODULE_SYSTEM})
ELSE(LIB_OPENVIBE_MODULE_SYSTEM)
MESSAGE(STATUS " [FAILED] lib OpenViBE-module-System-${OPENVIBE_MODULE_SYSTEM_LINKING}")
ENDIF(LIB_OPENVIBE_MODULE_SYSTEM)
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_SYSTEM}/src/)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic OpenViBE-module-System-${OPENVIBE_MODULE_SYSTEM_LINKING})
ADD_DEFINITIONS(-DTARGET_HAS_System)
ELSE(PATH_OPENVIBE_MODULES_SYSTEM)
......
......@@ -15,17 +15,19 @@ ELSE(DYNAMIC_LINK_OPENVIBE_MODULE_XML)
SET(OPENVIBE_MODULE_XML_LINKING static)
ENDIF(DYNAMIC_LINK_OPENVIBE_MODULE_XML)
FIND_PATH(PATH_OPENVIBE_MODULES_XML include/xml/defines.h PATHS $ENV{OpenViBE_modules}/xml $ENV{OpenViBE_module_xml})
IF(OV_BRANCH_MODULES_XML)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/xml/${OV_BRANCH_MODULES_XML})
ELSE(OV_BRANCH_MODULES_XML)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-modules/xml/${OV_TRUNK})
ENDIF(OV_BRANCH_MODULES_XML)
FIND_PATH(PATH_OPENVIBE_MODULES_XML src/xml/defines.h PATHS ${SRC_DIR})
IF(PATH_OPENVIBE_MODULES_XML)
MESSAGE(STATUS " Found OpenViBE module XML...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_XML}/include)
FIND_LIBRARY(LIB_OPENVIBE_MODULE_XML OpenViBE-module-XML-${OPENVIBE_MODULE_XML_LINKING} PATHS ${PATH_OPENVIBE_MODULES_XML}/lib)
IF(LIB_OPENVIBE_MODULE_XML)
MESSAGE(STATUS " [ OK ] lib ${LIB_OPENVIBE_MODULE_XML}")
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${LIB_OPENVIBE_MODULE_XML})
ELSE(LIB_OPENVIBE_MODULE_XML)
MESSAGE(STATUS " [FAILED] lib OpenViBE-module-XML-${OPENVIBE_MODULE_XML_LINKING}")
ENDIF(LIB_OPENVIBE_MODULE_XML)
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_MODULES_XML}/src/)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic OpenViBE-module-XML-${OPENVIBE_MODULE_XML_LINKING})
ADD_DEFINITIONS(-DTARGET_HAS_XML)
ELSE(PATH_OPENVIBE_MODULES_XML)
......
......@@ -3,7 +3,7 @@
# Adds library to target
# Adds include path
# ---------------------------------
FIND_PATH(PATH_OpenViBEPluginsGlobalDefines ovp_global_defines.h PATHS $ENV{OpenViBE_cmake_modules})
FIND_PATH(PATH_OpenViBEPluginsGlobalDefines ovp_global_defines.h PATHS $ENV{OpenViBE_base}/cmake-modules)
IF(PATH_OpenViBEPluginsGlobalDefines)
MESSAGE(STATUS " Found OpenViBE plugins global defines...")
INCLUDE_DIRECTORIES(${PATH_OpenViBEPluginsGlobalDefines})
......
......@@ -15,17 +15,18 @@ ELSE(DYNAMIC_LINK_OPENVIBE_TOOLKIT)
SET(OPENVIBE_TOOLKIT_LINKING static)
ENDIF(DYNAMIC_LINK_OPENVIBE_TOOLKIT)
FIND_PATH(PATH_OPENVIBE_TOOLKIT include/openvibe-toolkit/ovtk_all.h PATHS $ENV{OpenViBE_toolkit})
IF(OV_BRANCH_TOOLKIT)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-toolkit/${OV_BRANCH_TOOLKIT})
ELSE(OV_BRANCH_TOOLKIT)
set(SRC_DIR $ENV{OpenViBE_base}/openvibe-toolkit/${OV_TRUNK})
ENDIF(OV_BRANCH_TOOLKIT)
FIND_PATH(PATH_OPENVIBE_TOOLKIT src/openvibe-toolkit/ovtk_all.h PATHS ${SRC_DIR})
IF(PATH_OPENVIBE_TOOLKIT)
MESSAGE(STATUS " Found OpenViBE-toolkit...")
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_TOOLKIT}/include)
FIND_LIBRARY(LIB_OPENVIBE_TOOLKIT OpenViBE-toolkit-${OPENVIBE_LINKING} PATH ${PATH_OPENVIBE_TOOLKIT}/lib)
IF(LIB_OPENVIBE_TOOLKIT)
MESSAGE(STATUS " [ OK ] lib ${LIB_OPENVIBE_TOOLKIT}")
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${LIB_OPENVIBE_TOOLKIT})
ELSE(LIB_OPENVIBE_TOOLKIT)
MESSAGE(STATUS " [FAILED] lib OpenViBE-toolkit-${OPENVIBE_TOOLKIT_LINKING}")
ENDIF(LIB_OPENVIBE_TOOLKIT)
INCLUDE_DIRECTORIES(${PATH_OPENVIBE_TOOLKIT}/src/)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic OpenViBE-toolkit-${OPENVIBE_TOOLKIT_LINKING})
ADD_DEFINITIONS(-DTARGET_HAS_OpenViBEToolkit)
ELSE(PATH_OPENVIBE_TOOLKIT)
......
......@@ -4,10 +4,9 @@
# Adds include path
# ---------------------------------
INCLUDE("FindThirdPartyBoost")
IF(UNIX)
FIND_LIBRARY(LIB_Boost_Regex NAMES "boost_regex-mt" PATHS $ENV{OpenViBE_dependencies}/lib $ENV{OpenViBE_dependencies}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIB_Boost_Regex NAMES "boost_regex-mt" PATHS $ENV{OpenViBE_dependencies}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIB_Boost_Regex NAMES "boost_regex-mt" PATHS $ENV{OpenViBE_dependencies}/lib)
IF(LIB_Boost_Regex)
MESSAGE(STATUS " [ OK ] lib ${LIB_Boost_Regex}")
......@@ -17,8 +16,3 @@ IF(UNIX)
ENDIF(LIB_Boost_Regex)
ENDIF(UNIX)
IF(WIN32)
IF(PATH_BOOST)
LINK_DIRECTORIES(${PATH_BOOST}/lib)
ENDIF(PATH_BOOST)
ENDIF(WIN32)
......@@ -4,10 +4,8 @@
# Adds include path
# ---------------------------------
INCLUDE("FindThirdPartyBoost")
IF(UNIX)
FIND_LIBRARY(LIB_Boost_Thread NAMES "boost_thread-mt" PATHS $ENV{OpenViBE_dependencies}/lib $ENV{OpenViBE_dependencies}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIB_Boost_Thread NAMES "boost_thread-mt" PATHS $ENV{OpenViBE_dependencies}/lib NO_DEFAULT_PATH)
FIND_LIBRARY(LIB_Boost_Thread NAMES "boost_thread-mt" PATHS $ENV{OpenViBE_dependencies}/lib)
IF(LIB_Boost_Thread)
MESSAGE(STATUS " [ OK ] lib ${LIB_Boost_Thread}")
......@@ -25,9 +23,3 @@ IF(UNIX)
MESSAGE(STATUS " FAILED to find pthread...")
ENDIF(LIB_STANDARD_MODULE_PTHREAD)
ENDIF(UNIX)
IF(WIN32)
IF(PATH_BOOST)
LINK_DIRECTORIES(${PATH_BOOST}/lib)
ENDIF(PATH_BOOST)
ENDIF(WIN32)
......@@ -17,11 +17,8 @@ IF(WIN32)
SET(CEGUI_FOUND TRUE)
SET(OgreCEGUIRenderer_FOUND TRUE)
SET(CEGUI_INCLUDE_DIRS ${PATH_CEGUI}/cegui/include)
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(CEGUI_LIBRARIES CEGUIBase_d CEGUIOgreRenderer_d)
ELSE(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(CEGUI_LIBRARIES CEGUIBase CEGUIOgreRenderer)
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(CEGUI_LIBRARIES_DEBUG CEGUIBase_d CEGUIOgreRenderer_d)
SET(CEGUI_LIBRARIES_RELEASE CEGUIBase CEGUIOgreRenderer)
SET(CEGUI_LIBRARY_DIRS ${PATH_CEGUI}/lib)
ENDIF(PATH_CEGUI)
ENDIF(WIN32)
......@@ -38,6 +35,7 @@ IF(CEGUI_FOUND AND OgreCEGUIRenderer_FOUND)
ADD_DEFINITIONS(${CEGUI_CFLAGS} ${OgreCEGUIRenderer_CFLAGS})
ADD_DEFINITIONS(${CEGUI_CFLAGS_OTHERS} ${OgreCEGUIRenderer_CFLAGS_OTHERS})
LINK_DIRECTORIES(${CEGUI_LIBRARY_DIRS} ${OgreCEGUIRenderer_LIBRARY_DIRS})
IF(UNIX)
FOREACH(CEGUI_LIB ${CEGUI_LIBRARIES} ${OgreCEGUIRenderer_LIBRARIES})
SET(CEGUI_LIB1 "CEGUI_LIB1-NOTFOUND")
FIND_LIBRARY(CEGUI_LIB1 NAMES ${CEGUI_LIB} PATHS ${CEGUI_LIBRARY_DIRS} ${CEGUI_LIBDIR} NO_DEFAULT_PATH)
......@@ -49,6 +47,32 @@ IF(CEGUI_FOUND AND OgreCEGUIRenderer_FOUND)
MESSAGE(STATUS " [FAILED] Third party lib ${CEGUI_LIB}")
ENDIF(CEGUI_LIB1)
ENDFOREACH(CEGUI_LIB)
ENDIF(UNIX)
IF(WIN32)
FOREACH(CEGUI_LIB ${CEGUI_LIBRARIES_DEBUG})
SET(CEGUI_LIB1 "CEGUI_LIB1-NOTFOUND")
FIND_LIBRARY(CEGUI_LIB1 NAMES ${CEGUI_LIB} PATHS ${CEGUI_LIBRARY_DIRS} ${CEGUI_LIBDIR} NO_DEFAULT_PATH)
FIND_LIBRARY(CEGUI_LIB1 NAMES ${CEGUI_LIB})
IF(CEGUI_LIB1)
MESSAGE(STATUS " [ OK ] Third party lib ${CEGUI_LIB1}")
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic debug ${CEGUI_LIB1})
ELSE(CEGUI_LIB1)
MESSAGE(STATUS " [FAILED] Third party lib ${CEGUI_LIB}")
ENDIF(CEGUI_LIB1)
ENDFOREACH(CEGUI_LIB)
FOREACH(CEGUI_LIB ${CEGUI_LIBRARIES_RELEASE})
SET(CEGUI_LIB1 "CEGUI_LIB1-NOTFOUND")
FIND_LIBRARY(CEGUI_LIB1 NAMES ${CEGUI_LIB} PATHS ${CEGUI_LIBRARY_DIRS} ${CEGUI_LIBDIR} NO_DEFAULT_PATH)
FIND_LIBRARY(CEGUI_LIB1 NAMES ${CEGUI_LIB})
IF(CEGUI_LIB1)
MESSAGE(STATUS " [ OK ] Third party lib ${CEGUI_LIB1}")
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic optimized ${CEGUI_LIB1})
ELSE(CEGUI_LIB1)
MESSAGE(STATUS " [FAILED] Third party lib ${CEGUI_LIB}")
ENDIF(CEGUI_LIB1)
ENDFOREACH(CEGUI_LIB)
ENDIF(WIN32)
ELSE(CEGUI_FOUND AND OgreCEGUIRenderer_FOUND)
MESSAGE(STATUS " FAILED to find CEGUI/OgreCEGUIRenderer...")
ENDIF(CEGUI_FOUND AND OgreCEGUIRenderer_FOUND)
......@@ -6,20 +6,19 @@
IF(WIN32)
# edkErrorCode.h EmoStateDLL.h
#FIND_PATH(PATH_EmotivAPI edk.h PATHS "C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM" "C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM/doc/examples/include" "C:/Program Files (x86)/Emotiv Development Kit_v1.0.0.3-PREMIUM" "C:/Program Files (x86)/Emotiv Development Kit_v1.0.0.3-PREMIUM/doc/examples/include" $ENV{OpenViBE_dependencies})
FIND_PATH(PATH_EmotivAPI edk.h PATHS
"C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM"
"C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM/doc/examples/include"
"C:/Program Files (x86)/Emotiv Development Kit_v1.0.0.3-PREMIUM"
"C:/Program Files (x86)/Emotiv Development Kit_v1.0.0.3-PREMIUM/doc/examples/include"
"C:/Program Files/Emotiv Research Edition SDK_v1.0.0.4-PREMIUM"
"C:/Program Files/Emotiv Research Edition SDK_v1.0.0.4-PREMIUM/doc/examples/include"
"C:/Program Files (x86)/Emotiv Research Edition SDK_v1.0.0.4-PREMIUM"
"C:/Program Files (x86)/Emotiv Research Edition SDK_v1.0.0.4-PREMIUM/doc/examples/include"
"C:/Program Files/Emotiv Research Edition SDK_v1.0.0.5-PREMIUM"
"C:/Program Files/Emotiv Research Edition SDK_v1.0.0.5-PREMIUM/doc/examples/include"
"C:/Program Files (x86)/Emotiv Research Edition SDK_v1.0.0.5-PREMIUM"
"C:/Program Files (x86)/Emotiv Research Edition SDK_v1.0.0.5-PREMIUM/doc/examples/include"
$ENV{OpenViBE_dependencies})
FILE(GLOB PATH_Candidates
"C:/Program Files/Emotiv Development Kit*"
"C:/Program Files/Emotiv Research Edition*"
"C:/Program Files (x86)/Emotiv Development Kit*"
"C:/Program Files (x86)/Emotiv Research Edition*"
)
FOREACH(Candidate_folder ${PATH_Candidates})
# MESSAGE(STATUS "Found path ${PATH_Candidate}")
LIST(APPEND PATH_Candidates ${Candidate_folder}/doc/examples/include)
ENDFOREACH(Candidate_folder ${PATH_Candidates})
# MESSAGE(STATUS "Emotiv paths found ${PATH_Candidates}")
FIND_PATH(PATH_EmotivAPI edk.h PATHS ${PATH_Candidates} $ENV{OpenViBE_dependencies})
IF(PATH_EmotivAPI)
MESSAGE(STATUS " Found Emotiv API...")
INCLUDE_DIRECTORIES(${PATH_EmotivAPI})
......
......@@ -9,6 +9,10 @@
# Adds include path
# ---------------------------------
IF(WIN32)
MESSAGE(STATUS " Skipping MobiLabPlus, not supported on Windows")
ENDIF(WIN32)
IF(UNIX)
FIND_LIBRARY(gMOBIlabplus_LIBRARY NAMES gMOBIlabplus PATHS /usr/lib /usr/local/lib)
IF(gMOBIlabplus_LIBRARY)
......
......@@ -13,17 +13,17 @@
INCLUDE("FindThirdPartyPkgConfig")
IF(WIN32)
pkg_check_modules(GTK "gtk+-win32-2.0")
pkg_check_modules(GTK gtk+-win32-2.0 gthread-2.0)
ELSE(WIN32)
pkg_check_modules(GTK "gtk+-2.0")
pkg_check_modules(GTK "gtk+-2.0" "gthread-2.0")
ENDIF(WIN32)
pkg_check_modules(GTHREAD gthread-2.0)
IF(GTK_FOUND AND GTHREAD_FOUND)
IF(GTK_FOUND)
MESSAGE(STATUS " Found GTK+...")
INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIRS} ${GTHREAD_INCLUDE_DIRS})
ADD_DEFINITIONS(${GTK_CFLAGS} ${GTHREAD_CFLAGS})
ADD_DEFINITIONS(${GTK_CFLAGS_OTHERS} ${GTHREAD_CFLAGS_OTHERS})