From 6a897a2a9bd02df0533e9dbc0083a90c41ba816f Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 10 Mar 2019 16:57:42 +0100 Subject: Fix: don't include xaudio2 if you are not going to compile it This is more in trend with other files, where if the driver is not selected, we don't even attempt to compile it. --- configure | 1 + projects/generate | 1 + projects/generate.vbs | 1 + source.list | 4 +++- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 0f6ac2503..f6c6a2eec 100755 --- a/configure +++ b/configure @@ -123,6 +123,7 @@ AWKCOMMAND=' if ($0 == "MSVC" && "'$os'" != "MSVC") { next; } if ($0 == "DIRECTMUSIC" && "'$with_direct_music'" == "0") { next; } if ($0 == "FLUIDSYNTH" && "'$fluidsynth'" == "" ) { next; } + if ($0 == "USE_XAUDIO2" && "'$with_xaudio2'" == "0") { next; } if ($0 == "USE_THREADS" && "'$with_threads'" == "0") { next; } if ($0 == "USE_SSE" && "'$with_sse'" != "1") { next; } diff --git a/projects/generate b/projects/generate index 4524c545e..2ab89e8f1 100755 --- a/projects/generate +++ b/projects/generate @@ -138,6 +138,7 @@ load_main_data() { if ($0 == "MSVC" && "'$os'" != "MSVC") { next; } if ($0 == "DIRECTMUSIC" && "'$enable_directmusic'" != "1") { next; } if ($0 == "FLUIDSYNTH" && "'$enable_fluidsynth'" != "1") { next; } + if ($0 == "USE_XAUDIO2" && "'$with_xaudio2'" == "0") { next; } if ($0 == "USE_THREADS" && "'$with_threads'" == "0") { next; } skip += 1; diff --git a/projects/generate.vbs b/projects/generate.vbs index 3b4adf4bd..06e037c4c 100644 --- a/projects/generate.vbs +++ b/projects/generate.vbs @@ -180,6 +180,7 @@ Sub load_main_data(filename, ByRef vcxproj, ByRef filters, ByRef files) line = "DIRECTMUSIC" Or _ line = "AI" Or _ line = "USE_SSE" Or _ + line = "USE_XAUDIO2" Or _ line = "USE_THREADS" _ ) Then skip = skip + 1 deep = deep + 1 diff --git a/source.list b/source.list index 5e9c52b73..b567a0026 100644 --- a/source.list +++ b/source.list @@ -1141,7 +1141,9 @@ sound/null_s.cpp #end #if WIN32 sound/win32_s.cpp - sound/xaudio2_s.cpp + #if USE_XAUDIO2 + sound/xaudio2_s.cpp + #end #end #end -- cgit v1.2.3-70-g09d2