mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 12:12:50 +01:00
fix shared FAudio build
This commit is contained in:
parent
3a026a7dc3
commit
1d85c9d201
21
3rdparty/CMakeLists.txt
vendored
21
3rdparty/CMakeLists.txt
vendored
@ -222,17 +222,20 @@ add_subdirectory(OpenAL EXCLUDE_FROM_ALL)
|
||||
# FAudio
|
||||
set(FAUDIO_TARGET 3rdparty_dummy_lib)
|
||||
if(USE_FAUDIO)
|
||||
# FAudio depends on SDL2
|
||||
find_package(SDL2)
|
||||
if (NOT SDL2_FOUND OR SDL2_VERSION VERSION_LESS 2.0.9)
|
||||
message(FATAL_ERROR "-- RPCS3: FAudio requires SDL 2.0.9 or newer.")
|
||||
endif()
|
||||
if (USE_SYSTEM_FAUDIO)
|
||||
find_package(FAudio-config)
|
||||
target_compile_definitions(FAudio INTERFACE -DHAVE_FAUDIO)
|
||||
set(FAUDIO_TARGET FAudio)
|
||||
message(STATUS "RPCS3: Using system FAudio")
|
||||
find_package(FAudio REQUIRED CONFIGS FAudio-config.cmake)
|
||||
add_library(3rdparty_FAudio INTERFACE)
|
||||
target_link_libraries(3rdparty_FAudio INTERFACE FAudio)
|
||||
target_compile_definitions(3rdparty_FAudio INTERFACE -DHAVE_FAUDIO)
|
||||
set(FAUDIO_TARGET 3rdparty_FAudio)
|
||||
else()
|
||||
# FAudio depends on SDL2
|
||||
find_package(SDL2)
|
||||
if (NOT SDL2_FOUND OR SDL2_VERSION VERSION_LESS 2.0.9)
|
||||
message(FATAL_ERROR "-- RPCS3: FAudio requires SDL 2.0.9 or newer.")
|
||||
endif()
|
||||
|
||||
message(STATUS "RPCS3: Using builtin FAudio")
|
||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared library")
|
||||
add_subdirectory(FAudio EXCLUDE_FROM_ALL)
|
||||
target_compile_definitions(FAudio INTERFACE -DHAVE_FAUDIO)
|
||||
|
Loading…
Reference in New Issue
Block a user