Fixing problems with static linking

parent 5550e942
......@@ -135,7 +135,11 @@ endif( )
if( BUILD_SHARED_LIBS )
add_definitions( -DITA_DATA_SOURCES_EXPORT )
else( )
add_definitions( -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC )
add_definitions( -DITA_DATA_SOURCES_STATIC )
endif( )
if( ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_BASE_STATIC )
endif( )
......
......@@ -69,7 +69,8 @@ ITAPortaudioInterface::ITA_PA_ERRORCODE ITAPortaudioInterface::Initialize( int i
if( m_iError != ITA_PA_NO_ERROR )
return m_iError;
if( iDriverID < 0 || iDriverID >= Pa_GetDeviceCount() ) {
if( iDriverID < 0 || iDriverID >= Pa_GetDeviceCount() )
{
Pa_Terminate();
m_bInitialized = false;
return ITA_PA_INVALID_DEVICE;
......
......@@ -12,8 +12,12 @@ endif( )
if( ITA_VISTA_BUILD_STATIC )
add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC )
if( WIN32 )
list( APPEND VISTA_USE_PACKAGE_LIBRARIES Ws2_32 Winmm )
endif( )
endif( )
add_executable( BufferDataSourceTest BufferDataSourceTest.cpp )
target_link_libraries( BufferDataSourceTest ${VISTA_USE_PACKAGE_LIBRARIES} )
......
......@@ -3,10 +3,20 @@ cmake_minimum_required( VERSION 2.8 )
project( ITADataSourcesTest )
list( APPEND CMAKE_MODULE_PATH "$ENV{VISTA_CMAKE_COMMON}" )
include( VistaCommon )
vista_use_package( ITADataSources REQUIRED FIND_DEPENDENCIES )
if( ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_BASE_STATIC -DITA_DATA_SOURCES_STATIC )
endif( )
if( ITA_VISTA_BUILD_STATIC )
add_definitions( -DVISTATOOLS_STATIC -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTAINTERPROCCOMM_STATIC )
if( WIN32 )
list( APPEND VISTA_USE_PACKAGE_LIBRARIES Ws2_32 Winmm )
endif( )
endif( )
add_executable( ListDevices ListDevices.cpp )
target_link_libraries( ListDevices ${VISTA_USE_PACKAGE_LIBRARIES} )
......
......@@ -7,6 +7,13 @@ include( VistaCommon )
vista_use_package( VistaCoreLibs REQUIRED COMPONENTS VistaInterProcComm FIND_DEPENDENCIES )
vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES )
if( ITA_VISTA_BUILD_STATIC AND WIN32 )
list( APPEND VISTA_USE_PACKAGE_LIBRARIES Ws2_32 Winmm )
endif( )
if( ITA_CORE_LIBS_BUILD_STATIC )
add_definitions( -DITA_BASE_STATIC )
endif( )
add_executable( ITAVistaNetTest VistaNetTest.cpp )
target_link_libraries( ITAVistaNetTest ${VISTA_USE_PACKAGE_LIBRARIES} )
......
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