Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3rdparty/CMake: Fixes for libusb/SDL2 #9615

Merged
merged 2 commits into from Jan 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion 3rdparty/CMakeLists.txt
Expand Up @@ -131,6 +131,7 @@ else()
target_link_libraries(usb-1.0-shared INTERFACE PkgConfig::LIBUSB)
else()
# we don't have the system libusb, so we compile from submodule
unset(LIBUSB_LIBRARIES CACHE)
add_subdirectory(libusb_cmake EXCLUDE_FROM_ALL)
endif()
endif()
Expand Down Expand Up @@ -354,7 +355,7 @@ target_link_libraries(3rdparty_openal INTERFACE ${OPENAL_LIBRARY})
set(FAUDIO_TARGET 3rdparty_dummy_lib)
if(USE_FAUDIO)
# FAudio depends on SDL2
pkg_check_modules(SDL2 sdl2)
find_package(SDL2)
if (NOT SDL2_FOUND OR SDL2_VERSION VERSION_LESS 2.0.9)
message("-- RPCS3: FAudio requires SDL 2.0.9 or newer.")
else()
Expand Down
9 changes: 6 additions & 3 deletions rpcs3/Emu/CMakeLists.txt
Expand Up @@ -122,9 +122,12 @@ if(USE_PULSE AND PULSE_FOUND)
target_link_libraries(rpcs3_emu PUBLIC 3rdparty::pulse)
endif()

if(USE_FAUDIO AND SDL2_FOUND AND NOT SDL2_VERSION VERSION_LESS 2.0.9)
target_sources(rpcs3_emu PRIVATE Audio/FAudio/FAudioBackend.cpp)
target_link_libraries(rpcs3_emu PUBLIC 3rdparty::faudio)
if(USE_FAUDIO)
find_package(SDL2)
if(SDL2_FOUND AND NOT SDL2_VERSION VERSION_LESS 2.0.9)
target_sources(rpcs3_emu PRIVATE Audio/FAudio/FAudioBackend.cpp)
target_link_libraries(rpcs3_emu PUBLIC 3rdparty::faudio)
endif()
endif()

if(WIN32)
Expand Down