From 5b10a804016e07e705d76e87824f4f6506a3adad Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Sun, 16 Apr 2023 00:57:34 -0500 Subject: CMake: Use targets for all optionally-external dependencies --- Source/Core/InputCommon/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Source/Core/InputCommon') diff --git a/Source/Core/InputCommon/CMakeLists.txt b/Source/Core/InputCommon/CMakeLists.txt index 0343717a34..ed19e12b74 100644 --- a/Source/Core/InputCommon/CMakeLists.txt +++ b/Source/Core/InputCommon/CMakeLists.txt @@ -81,7 +81,8 @@ PUBLIC PRIVATE fmt::fmt - ${spng_target} + sfml-network + spng::spng ) if(WIN32) @@ -146,7 +147,7 @@ elseif(ANDROID) endif() if(NOT ANDROID) - target_link_libraries(inputcommon PUBLIC ${LIBUSB_LIBRARIES}) + target_link_libraries(inputcommon PUBLIC LibUSB::LibUSB) endif() if(LIBEVDEV_FOUND AND LIBUDEV_FOUND) @@ -174,12 +175,13 @@ if(UNIX) ) endif() -if(SDL2_FOUND) +if(ENABLE_SDL) target_sources(inputcommon PRIVATE ControllerInterface/SDL/SDL.cpp ControllerInterface/SDL/SDL.h ) target_link_libraries(inputcommon PRIVATE SDL2::SDL2) + target_compile_definitions(inputcommon PUBLIC HAVE_SDL2=1) endif() if(MSVC) -- cgit v1.2.3