CMake: Use targets for all optionally-external dependencies

This commit is contained in:
TellowKrinkle
2023-04-16 00:57:34 -05:00
parent 63090d411d
commit 5b10a80401
25 changed files with 172 additions and 133 deletions

View File

@ -603,24 +603,23 @@ target_link_libraries(core
PUBLIC
audiocommon
common
cubeb
discio
enet
enet::enet
expr
inputcommon
${MBEDTLS_LIBRARIES}
MbedTLS::mbedtls
pugixml
RangeSet::RangeSet
sfml-network
sfml-system
videonull
videoogl
videosoftware
PRIVATE
cubeb::cubeb
FatFs
fmt::fmt
${LZO}
LZO::LZO
ZLIB::ZLIB
)
@ -644,9 +643,8 @@ elseif (ANDROID)
)
endif()
if(LIBUSB_FOUND)
# Using shared LibUSB
target_link_libraries(core PUBLIC ${LIBUSB_LIBRARIES})
if(TARGET LibUSB::LibUSB)
target_link_libraries(core PUBLIC LibUSB::LibUSB)
target_sources(core PRIVATE
IOS/USB/LibusbDevice.cpp
IOS/USB/LibusbDevice.h