mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-28 09:23:34 +00:00
CMake: Unset LIBUSB_LIBRARIES when using libusb submodule
If the system has libusb installed but USE_SYS_LIBUSB is false, the static libusb will link against the system libusb (as pkg_check_modules sets LIBUSB_LIBRARIES, and 3rdparty/libusb_cmake/libusb.cmake links the usb-1.0-static target with LIBUSB_LIBRARIES). Unset LIBUSB_LIBRARIES to avoid this when using the libusb submodule.
This commit is contained in:
parent
d7a8d385d8
commit
c06707c891
1
3rdparty/CMakeLists.txt
vendored
1
3rdparty/CMakeLists.txt
vendored
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user