Removing VistaInterProcComm dependency. VABase now also works without...

Removing VistaInterProcComm dependency. VABase now also works without vistaCMakeCommon, if not found. If it helps anyone.
parent cfecaf38
cmake_minimum_required( VERSION 2.8 )
project( VABase )
list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
include( VistaCommon )
vista_use_package( VistaCoreLibs REQUIRED COMPONENTS VistaInterProcComm FIND_DEPENDENCIES )
# Including the source files of all source subfolders recursively
include( "include/_SourceFiles.cmake" )
include( "src/_SourceFiles.cmake" )
# ViSTA CMake build environment
if( EXISTS $ENV{VISTA_CMAKE_COMMON} )
# VistaCMakeCommon is available, use the ViSTA build environment
list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
include( VistaCommon )
else( )
message( "Could not find VistaCMakeCommon. Only VABase can be build without the ViSTA CMake build environment. See http://www.virtualacoustics.org for help." )
endif( )
include_directories( "include" )
# preprocessor
if( BUILD_SHARED_LIBS )
add_definitions( -DVABASE_EXPORT )
else( )
add_definitions( -DVABASE_STATIC )
endif( )
if( ITA_VISTA_BUILD_STATIC )
add_definitions( -DVISTAINTERPROCCOMM_STATIC -DVISTA_STATIC )
endif( )
if( NOT WIN32 )
add_definitions( -std=gnu++11 )
endif( )
# headers and source files
set( VABase_Headers
"include/VA.h"
"include/VAAudioSignalSource.h"
"include/VABase.h"
"include/VABaseDefinitions.h"
"include/VAEvent.h"
"include/VAEventHandlerGlobalLock.h"
"include/VAException.h"
"include/VAInterface.h"
"include/VAObject.h"
"include/VAObjectRegistry.h"
"include/VASamples.h"
"include/VAStruct.h"
"include/VAVersion.h"
)
set( VABase_Src
"src/VABase.cpp"
"src/VAEvent.cpp"
"src/VAEventHandlerGlobalLock.cpp"
"src/VAException.cpp"
"src/VAInterface.cpp"
"src/VAObject.cpp"
"src/VAObjectRegistry.cpp"
"src/VASamples.cpp"
"src/VAStruct.cpp"
"src/VAVersion.cpp"
)
# linker
add_library( VABase "${ProjectSources}" )
target_link_libraries( VABase ${VISTA_USE_PACKAGE_LIBRARIES} )
add_library( VABase ${VABase_Headers} ${VABase_Src} )
target_link_libraries( VABase )
# configure
......@@ -47,4 +76,4 @@ set_property( TARGET VABase PROPERTY FOLDER "VA" )
if( ITA_VA_WITH_TESTS )
set( VABASE_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
endif()
endif( )
## VABase
VABase provides a (partly abstract) C++ interface for the Virtual Acoustics framework called [VA](http://git.rwth-aachen.de/ita/VA).
VABase provides a (mostly abstract) C++ interface for the Virtual Acoustics framework called [VA](http://git.rwth-aachen.de/ita/VA).
It is implemented by a core ([VACore](http://git.rwth-aachen.de/ita/VACore)) that creates virtual acoustic environments for real-time applications.
To use VA in other applications, you can use this C++ interface directly or via a network protocol where you can connect with a VA server (for example [VAServer](http://git.rwth-aachen.de/ita/VAServer) or [VAGUI/todo](http://git.rwth-aachen.de/ita/VA)) and remotely control it.
There are also binding interfaces for oter languages, like Matlab ([VAMatlab](http://git.rwth-aachen.de/ita/VAVAMatlab)), Lua ([VALua](http://git.rwth-aachen.de/ita/VALua)) and C# ([VACS](http://git.rwth-aachen.de/ita/VACS)).
To use VA in other applications, you can use this C++ interface directly with the VACore libraries, or via a network protocol where you can connect with a VA server (for example [VAServer](http://git.rwth-aachen.de/ita/VAServer) or [Redstart](http://git.rwth-aachen.de/ita/VA/Redstart)) and remotely control it.
There are also binding interfaces for oter languages, like Matlab ([VAMatlab](http://git.rwth-aachen.de/ita/VAMatlab)), Python ([VAPython](http://git.rwth-aachen.de/ita/VAPython)), , Lua ([VALua](http://git.rwth-aachen.de/ita/VALua)) and C# ([VACS](http://git.rwth-aachen.de/ita/VACS)).
For the [ViSTA framework](https://devhub.vr.rwth-aachen.de/VR-Group/ViSTA), the [VistaMedia/Audio](http://devhub.vr.rwth-aachen.de/VR-Group/VistaMedia) add-on has an implementation that can run a VA core or control a remote VA server.
......@@ -26,4 +26,12 @@ limitations under the License.
### Quick build guide
It is recommended to clone and follow the build guide of the parent project [VA](https://git.rwth-aachen.de/ita/VA), which includes this project as a submodule.
#### Preface
It is recommended to clone and follow the build guide of the parent project [VA](https://git.rwth-aachen.de/ita/VA), which includes this project as a submodule. You can find comprehensive help on [virtualacoustics.org](http://www.virtualacoustics.org).
#### Building VABase
You can build VABase using a C++11 compiler. Use CMake to generate project files that help building it, for instance Makefiles or Visual Studio solutions. VABase has no dependencies.
If you want to include VA into your application, you either have to link against VANet or VACore (see above).
......@@ -23,7 +23,6 @@
* event handlers, like attaching/detaching event handlers to
* event handler registrys and destruction of event handlers.
*/
class VABASE_API IVAEventHandlerGlobalLock
{
public:
......
# $Id:$
set( RelativeDir "include" )
set( RelativeSourceGroup "include" )
set( DirFiles
VA.h
VAAudioSignalSource.h
VABase.h
VABaseDefinitions.h
VAEvent.h
VAEventHandlerGlobalLock.h
VAException.h
VAInterface.h
VAObject.h
VAObjectRegistry.h
VASamples.h
VAStruct.h
VAVersion.h
_SourceFiles.cmake
)
set( DirFiles_SourceGroup "${RelativeSourceGroup}" )
set( LocalSourceGroupFiles )
foreach( File ${DirFiles} )
list( APPEND LocalSourceGroupFiles "${RelativeDir}/${File}" )
list( APPEND ProjectSources "${RelativeDir}/${File}" )
endforeach()
source_group( ${DirFiles_SourceGroup} FILES ${LocalSourceGroupFiles} )
......@@ -13,23 +13,22 @@
#include <VAEventHandlerGlobalLock.h>
// @todo: remove dependency and replace by c++11 std::mutex
#include <VistaInterProcComm/Concurrency/VistaMutex.h>
#include <mutex>
// Implementation class
class CVAEventHandlerGlobalLockImpl : public IVAEventHandlerGlobalLock
{
public:
mutable VistaMutex m_oLock;
mutable std::mutex m_oLock;
inline void Lock() const
{
m_oLock.Lock();
m_oLock.lock();
};
inline void Unlock() const
{
m_oLock.Unlock();
m_oLock.unlock();
};
inline CVAEventHandlerGlobalLockImpl() {};
......@@ -43,4 +42,3 @@ IVAEventHandlerGlobalLock& IVAEventHandlerGlobalLock::GetInstance()
{
return g_oEventHandlerGlobalLock;
}
# $Id:$
set( RelativeDir "src" )
set( RelativeSourceGroup "Source Files" )
set( DirFiles
VABase.cpp
VAEvent.cpp
VAEventHandlerGlobalLock.cpp
VAException.cpp
VAInterface.cpp
VAObject.cpp
VAObjectRegistry.cpp
VASamples.cpp
VAStruct.cpp
VAVersion.cpp
_SourceFiles.cmake
)
set( DirFiles_SourceGroup "${RelativeSourceGroup}" )
set( LocalSourceGroupFiles )
foreach( File ${DirFiles} )
list( APPEND LocalSourceGroupFiles "${RelativeDir}/${File}" )
list( APPEND ProjectSources "${RelativeDir}/${File}" )
endforeach()
source_group( ${DirFiles_SourceGroup} FILES ${LocalSourceGroupFiles} )
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