build: enable FAudio sound driver on Windows
Enable FAudio on Windows if cmake can find it. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
775a571f75
commit
ff21f8da21
|
@ -140,7 +140,17 @@ if(WIN32)
|
||||||
option(ENABLE_XAUDIO2 "Enable xaudio2 sound output for the wxWidgets port" ${XAUDIO2_DEFAULT})
|
option(ENABLE_XAUDIO2 "Enable xaudio2 sound output for the wxWidgets port" ${XAUDIO2_DEFAULT})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(ENABLE_FAUDIO "Enable FAudio sound output for the wxWidgets port" OFF)
|
set(ENABLE_FAUDIO_DEFAULT OFF)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
find_package(FAudio)
|
||||||
|
|
||||||
|
if(FAudio_FOUND)
|
||||||
|
set(ENABLE_FAUDIO_DEFAULT ON)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(ENABLE_FAUDIO "Enable FAudio sound output for the wxWidgets port" ${ENABLE_FAUDIO_DEFAULT})
|
||||||
|
|
||||||
option(ZIP_SUFFIX [=[suffix for release zip files, e.g. "-somebranch".zip]=] OFF)
|
option(ZIP_SUFFIX [=[suffix for release zip files, e.g. "-somebranch".zip]=] OFF)
|
||||||
|
|
||||||
|
|
|
@ -324,7 +324,6 @@ endif()
|
||||||
|
|
||||||
# FAudio.
|
# FAudio.
|
||||||
if(ENABLE_FAUDIO)
|
if(ENABLE_FAUDIO)
|
||||||
find_package(FAudio REQUIRED)
|
|
||||||
target_sources(visualboyadvance-m PRIVATE faudio.cpp)
|
target_sources(visualboyadvance-m PRIVATE faudio.cpp)
|
||||||
target_link_libraries(visualboyadvance-m FAudio::FAudio)
|
target_link_libraries(visualboyadvance-m FAudio::FAudio)
|
||||||
target_compile_definitions(visualboyadvance-m PRIVATE VBAM_ENABLE_FAUDIO)
|
target_compile_definitions(visualboyadvance-m PRIVATE VBAM_ENABLE_FAUDIO)
|
||||||
|
|
Loading…
Reference in New Issue