File: 0001-fix-linkage.patch

package info (click to toggle)
libxtrxll 0.0.1%2Bgit20201202.1b6eddf-1.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 488 kB
  • sloc: ansic: 7,030; xml: 19; sh: 18; makefile: 16
file content (20 lines) | stat: -rw-r--r-- 691 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Linking pthreads and libusb-1.0.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,6 +85,7 @@
 option(ENABLE_PCIE    "Enable PCIe Low-level XTRX driver"    ON)
 option(ENABLE_USB3380 "Enable USB3380 Low-level XTRX driver" ON)
 
+find_package(Threads REQUIRED)
 find_package(libusb3380)
 if(NOT LIBUSB3380_FOUND)
 	if(ENABLE_USB3380)
@@ -119,7 +120,7 @@
 add_library(xtrxll SHARED
 	xtrxll_log.c xtrxll_port.c xtrxll_base.c xtrxll_base_pcie.c
 	xtrxll_mmcm.c xtrxll_flash.c xtrxll_api.c)
-target_link_libraries(xtrxll ${SYSTEM_LIBS})
+target_link_libraries(xtrxll Threads::Threads usb-1.0 ${SYSTEM_LIBS})
 if(XTRXLL_STATIC AND ENABLE_PCIE)
 	target_link_libraries(xtrxll xtrxll_pcie)
 endif()