From 34b6f7362a9de43c706b5e4c7689f3035950312a Mon Sep 17 00:00:00 2001
From: Yuri D'Elia <wavexx@thregr.org>
Date: Sun, 8 Dec 2019 16:08:39 +0100
Subject: [PATCH] Add dependency on -ldl to hidapi (for dlclose) on linux

---
 src/hidapi/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/hidapi/CMakeLists.txt b/src/hidapi/CMakeLists.txt
index 1f53c9b69..f3045466e 100644
--- a/src/hidapi/CMakeLists.txt
+++ b/src/hidapi/CMakeLists.txt
@@ -15,5 +15,5 @@ add_library(hidapi STATIC ${HIDAPI_IMPL})
 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
 	# Don't link the udev library, as there are two versions out there (libudev.so.0, libudev.so.1), so they are linked explicitely.
 #	target_link_libraries(hidapi udev)
-	target_link_libraries(hidapi)
+	target_link_libraries(hidapi dl)
 endif()