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

@ -29,7 +29,7 @@ target_link_libraries(uicommon
PUBLIC
common
cpp-optparse
minizip-ng
minizip::minizip
pugixml
PRIVATE
@ -48,8 +48,8 @@ if(ENABLE_X11 AND X11_FOUND)
target_link_libraries(uicommon PUBLIC ${XRANDR_LIBRARIES})
endif()
if(LIBUSB_FOUND)
target_link_libraries(uicommon PRIVATE ${LIBUSB_LIBRARIES})
if(TARGET LibUSB::LibUSB)
target_link_libraries(uicommon PRIVATE LibUSB::LibUSB)
endif()
if(ENABLE_LLVM)