Adding vista static build switch. Also some style changes and warning fixes.

parent 1fc2ff95
......@@ -7,22 +7,35 @@ list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
include( VistaCommon )
vista_use_package( VistaCoreLibs REQUIRED COMPONENTS VistaInterProcComm FIND_DEPENDENCIES )
vista_use_package( VABase REQUIRED )
if( NOT DEFINED ITA_VA_BUILD_STATIC )
set( ITA_VA_BUILD_STATIC OFF CACHE BOOL "Build static VA libs" )
endif( NOT DEFINED ITA_VA_BUILD_STATIC )
if( NOT DEFINED ITA_VANET_INSTALL_WITH_DLLS )
set( ITA_VANET_INSTALL_WITH_DLLS ON CACHE BOOL "Install VANet with depending DLLs (use this switch with care)" )
endif( NOT DEFINED ITA_VANET_INSTALL_WITH_DLLS )
vista_use_package( VistaCoreLibs REQUIRED COMPONENTS VistaInterProcComm FIND_DEPENDENCIES )
vista_use_package( VABase REQUIRED )
# Including the source files of all source subfolders recursively
include( "include/_SourceFiles.cmake" )
include( "src/_SourceFiles.cmake" )
include_directories( "include" )
add_definitions( -DVABASE_DLL -DVANET_DLL -DVANET_EXPORTS )
if( NOT ITA_VA_BUILD_STATIC )
add_definitions( -DVANET_EXPORTS )
else( NOT ITA_VA_BUILD_STATIC )
add_definitions( -DVABASE_STATIC -DVACORE_STATIC -DVANET_STATIC )
set( BUILD_SHARED_LIBS_TEMP ${BUILD_SHARED_LIBS} )
if( BUILD_SHARED_LIBS )
set( BUILD_SHARED_LIBS OFF )
message( "Ignoring activated BUILD_SHARED_LIBS temporary because static VA requested" )
endif( BUILD_SHARED_LIBS )
endif( NOT ITA_VA_BUILD_STATIC )
add_library( VANet "${ProjectSources}" )
target_link_libraries( VANet ${VISTA_USE_PACKAGE_LIBRARIES} )
......
/*
* --------------------------------------------------------------------------------------------
*
* VVV VVV A
* VVV VVV AAA Virtual Acoustics
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA Virtual Acoustics (VA)
* VVV VVV AAA Real-time auralisation for virtual reality
* VVV VVV AAA
* VVVVVV AAA (c) Copyright Institut fr Technische Akustik (ITA)
* VVVV AAA RWTH Aachen (http://www.akustik.rwth-aachen.de)
* VVVVVV AAA (c) Copyright Institute of Technical Acoustics (ITA)
* VVVV AAA RWTH Aachen University (http://www.akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
*
* Datei: VANetDefinitions.h
*
* Zweck: Globale Definitionen der VANet-Bibliothek
*
* Autor(en): Frank Wefers (Frank.Wefers@akustik.rwth-aachen.de)
*
* ---------------------------------------------------------------------------------
* --------------------------------------------------------------------------------------------
*/
// $Id: VANetDefinitions.h 4530 2016-02-11 06:28:54Z stienen $
#ifndef __VANET_DEFINITIONS_H__
#define __VANET_DEFINITIONS_H__
#ifndef VA_INCLUDE_GUARD_VANET_DEFINITIONS
#define VA_INCLUDE_GUARD_VANET_DEFINITIONS
// Import-/Export-Konventionen fr die Bibliothek definieren
#ifdef VANET_DLL
// Dynamische Bibliothek
#if ( defined WIN32 ) && !( defined VANET_STATIC )
#ifdef VANET_EXPORTS
#define VANET_API __declspec(dllexport)
#define VANET_API __declspec( dllexport )
#else
#define VANET_API __declspec(dllimport)
#define VANET_API __declspec( dllimport )
#endif
#else
// Statische Bibliothek
#define VANET_API
#endif
......@@ -52,4 +40,4 @@
#define VANET_SVN_DATE "$Date: 2016-02-11 07:28:54 +0100 (Do, 11 Feb 2016) $"
#define VANET_SVN_REVISION "$Revision: 4530 $"
#endif // __VANET_DEFINITIONS_H__
#endif // VA_INCLUDE_GUARD_VANET_DEFINITIONS
......@@ -1219,20 +1219,26 @@ public:
m_pParent->ProcessEventChannelError();
}
}
#if VANET_CLIENT_VERBOSE==1
catch( VistaExceptionBase& oException )
{
#if VANET_CLIENT_VERBOSE==1
std::cout << "VANetClient: EventReceiver encountered connection error - "
<< oException.GetExceptionText() << std::endl;
#else
catch( VistaExceptionBase& )
{
#endif
IndicateLoopEnd();
m_pParent->ProcessEventChannelError();
}
#if VANET_CLIENT_VERBOSE==1
catch( CVAException& oException )
{
#if VANET_CLIENT_VERBOSE==1
std::cout << "VANetClient: EventReceiver encountered connection error - "
<< oException.ToString() << std::endl;
#else
catch( CVAException& )
{
#endif
IndicateLoopEnd();
m_pParent->ProcessEventChannelError();
......
......@@ -106,8 +106,8 @@ int main( int argc, char* argv[] )
oArgs["sourceid"] = 1;
std::vector< float > vfData( 900000 );
for( size_t i=0; i<vfData.size();i++) vfData[i] = float( i / vfData.size() );
oArgs["IRDataCh1"] = CVAStructValue( &vfData[0], vfData.size() * sizeof( float ) );
oArgs["IRDataCh2"] = CVAStructValue( &vfData[0], vfData.size() * sizeof( float ) );
oArgs["IRDataCh1"] = CVAStructValue( &vfData[0], int( vfData.size() * sizeof( float ) ) );
oArgs["IRDataCh2"] = CVAStructValue( &vfData[0], int( vfData.size() * sizeof( float ) ) );
pClient->GetCoreInstance()->CallModule( "GenericPath:MyGenericPath", oArgs, oRet );
break;
}
......
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