File: 0002-cmake-find-threads.patch

package info (click to toggle)
libusb3380 0.0.1%2Bgit20190125.c83d1e9-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 232 kB
  • sloc: ansic: 2,383; makefile: 5
file content (20 lines) | stat: -rw-r--r-- 772 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Linking pthreads.
--- libusb3380-0.0.1+git20190125.c83d1e9.orig/CMakeLists.txt
+++ libusb3380-0.0.1+git20190125.c83d1e9/CMakeLists.txt
@@ -36,6 +36,7 @@ endif()
 set(CROSS_COMPILE_INCLUDE_PATH "/usr/${CC_ARCH}/include")
 set(CROSS_COMPILE_LIB_PATH     "/usr/${CC_ARCH}/lib")
 
+find_package(Threads REQUIRED)
 find_package(libusb-1.0 REQUIRED)
 
 
@@ -62,7 +63,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows")
 endif()
 
 add_library(usb3380 SHARED ${USB3380_FILES})
-target_link_libraries(usb3380 ${LIBUSB_1_LIBRARIES} ${SYSTEM_LIBS})
+target_link_libraries(usb3380 Threads::Threads ${LIBUSB_1_LIBRARIES} ${SYSTEM_LIBS})
 set_target_properties(usb3380 PROPERTIES VERSION ${LIBVER} SOVERSION ${MAJOR_VERSION})
 
 install(TARGETS usb3380 DESTINATION ${LIBUSB3380_LIBRARY_DIR})