mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
[CMAKE] Portaudio: do not activate OSS on Windows (#477)
* [CMAKE] Portaudio: do not activate OSS on Windows I had a strange error when building the local portaudio library with MinGW under msys2. The error was caused by the file sys/soundcard.h that was found somewhere in the path, because use_pa_oss is always activated regardless the platform. So, in my opinion it is better to not activate this option if the platform is Windows. Afterall, it is useless in this case. * [CMAKE] Portaudio: move also remaining OSS code
This commit is contained in:
parent
50c30d9ff8
commit
f60bd42e9d
@ -22,7 +22,35 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
||||
"Use the portaudio WMME interface if available"
|
||||
YES
|
||||
)
|
||||
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
||||
else()
|
||||
# Look for OSS if the user wants it
|
||||
cmd_option(
|
||||
${_OPT}use_pa_oss
|
||||
"Use the OSS audio interface if available"
|
||||
YES
|
||||
)
|
||||
|
||||
if( ${_OPT}use_pa_oss )
|
||||
find_path( OSS_INCLUDE NAMES sys/soundcard.h )
|
||||
mark_as_advanced( FORCE OSS_INCLUDE )
|
||||
|
||||
if( OSS_INCLUDE )
|
||||
set( OSS_INCLUDE_DIRS ${OSS_INCLUDE} )
|
||||
endif()
|
||||
|
||||
find_library( OSS_LIBRARY NAMES ossaudio )
|
||||
mark_as_advanced( FORCE OSS_LIBRARY )
|
||||
|
||||
if( OSS_LIBRARY )
|
||||
set( OSS_LIBRARIES ${OSS_LIBRARY} )
|
||||
endif()
|
||||
|
||||
if( NOT OSS_INCLUDE_DIRS )
|
||||
set_cache_value( ${_OPT}use_pa_oss NO )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
||||
cmd_option(
|
||||
${_OPT}use_pa_coreaudio
|
||||
"Use the portaudio CoreAudio interface if available"
|
||||
@ -42,31 +70,6 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Look for OSS if the user wants it
|
||||
cmd_option(
|
||||
${_OPT}use_pa_oss
|
||||
"Use the OSS audio interface if available"
|
||||
YES
|
||||
)
|
||||
if( ${_OPT}use_pa_oss )
|
||||
find_path( OSS_INCLUDE NAMES sys/soundcard.h )
|
||||
mark_as_advanced( FORCE OSS_INCLUDE )
|
||||
|
||||
if( OSS_INCLUDE )
|
||||
set( OSS_INCLUDE_DIRS ${OSS_INCLUDE} )
|
||||
endif()
|
||||
|
||||
find_library( OSS_LIBRARY NAMES ossaudio )
|
||||
mark_as_advanced( FORCE OSS_LIBRARY )
|
||||
|
||||
if( OSS_LIBRARY )
|
||||
set( OSS_LIBRARIES ${OSS_LIBRARY} )
|
||||
endif()
|
||||
|
||||
if( NOT OSS_INCLUDE_DIRS )
|
||||
set_cache_value( ${_OPT}use_pa_oss NO )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# JACK can be dynamically loaded, linked to, or off
|
||||
|
Loading…
x
Reference in New Issue
Block a user