mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
Fixed issue with SDL2 version sometimes casuing build failure (#10599)
This commit is contained in:
parent
737b0dfd42
commit
fdc9619e7c
1 changed files with 21 additions and 15 deletions
36
3rdparty/CMakeLists.txt
vendored
36
3rdparty/CMakeLists.txt
vendored
|
@ -224,22 +224,28 @@ set(FAUDIO_TARGET 3rdparty_dummy_lib)
|
||||||
if(USE_FAUDIO)
|
if(USE_FAUDIO)
|
||||||
# FAudio depends on SDL2
|
# FAudio depends on SDL2
|
||||||
find_package(SDL2)
|
find_package(SDL2)
|
||||||
if (NOT SDL2_FOUND OR SDL2_VERSION VERSION_LESS 2.0.9)
|
if (NOT SDL2_FOUND OR SDL2_VERSION VERSION_LESS 2.0.12)
|
||||||
message(FATAL_ERROR "-- RPCS3: FAudio requires SDL 2.0.9 or newer.")
|
message(WARNING
|
||||||
endif()
|
"-- RPCS3: FAudio requires SDL 2.0.9 or newer. Please note, this warning"
|
||||||
if (USE_SYSTEM_FAUDIO)
|
"can also be displayed with SDL2 versions between 2.0.9-2.0.12, as the"
|
||||||
message(STATUS "RPCS3: Using system FAudio")
|
"CMake config files are not correctly installed. Since a valid SDL2"
|
||||||
find_package(FAudio REQUIRED CONFIGS FAudio-config.cmake)
|
">=2.0.9 version cannot be found, building with FAudio will be skipped.")
|
||||||
add_library(3rdparty_FAudio INTERFACE)
|
set(USE_FAUDIO False)
|
||||||
target_link_libraries(3rdparty_FAudio INTERFACE FAudio)
|
|
||||||
target_compile_definitions(3rdparty_FAudio INTERFACE -DHAVE_FAUDIO)
|
|
||||||
set(FAUDIO_TARGET 3rdparty_FAudio)
|
|
||||||
else()
|
else()
|
||||||
message(STATUS "RPCS3: Using builtin FAudio")
|
if (USE_SYSTEM_FAUDIO)
|
||||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared library")
|
message(STATUS "RPCS3: Using system FAudio")
|
||||||
add_subdirectory(FAudio EXCLUDE_FROM_ALL)
|
find_package(FAudio REQUIRED CONFIGS FAudio-config.cmake)
|
||||||
target_compile_definitions(FAudio INTERFACE -DHAVE_FAUDIO)
|
add_library(3rdparty_FAudio INTERFACE)
|
||||||
set(FAUDIO_TARGET FAudio)
|
target_link_libraries(3rdparty_FAudio INTERFACE FAudio)
|
||||||
|
target_compile_definitions(3rdparty_FAudio INTERFACE -DHAVE_FAUDIO)
|
||||||
|
set(FAUDIO_TARGET 3rdparty_FAudio)
|
||||||
|
else()
|
||||||
|
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)
|
||||||
|
set(FAUDIO_TARGET FAudio)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue