2022-10-05 09:27:46 +00:00
|
|
|
# ###################################### UlDAQ
|
|
|
|
if(LASP_HAS_ULDAQ)
|
|
|
|
message("Building UlDAQ")
|
|
|
|
|
|
|
|
if(NOT WIN32)
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_check_modules(libusb-1.0 REQUIRED libusb-1.0)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# This is rather coarse!
|
|
|
|
file(GLOB ULDAQ_FILES1 third_party/uldaq/src/*.cpp)
|
|
|
|
file(GLOB ULDAQ_FILES2 third_party/uldaq/src/*/*.cpp)
|
|
|
|
file(GLOB ULDAQ_FILES3 third_party/uldaq/src/*/*/*.cpp)
|
|
|
|
file(GLOB ULDAQ_FILES4 third_party/uldaq/src/usb/fw/*c)
|
|
|
|
|
|
|
|
add_library(uldaq STATIC ${ULDAQ_FILES1} ${ULDAQ_FILES2}
|
|
|
|
${ULDAQ_FILES3} ${ULDAQ_FILES4})
|
2022-10-05 11:39:45 +00:00
|
|
|
target_compile_options(uldaq PUBLIC -Wno-unused -Wno-empty-body
|
|
|
|
-Wno-missing-field-initializers)
|
2022-10-05 09:27:46 +00:00
|
|
|
|
|
|
|
if(NOT WIN32)
|
|
|
|
# message("libUSB libs: ${libusb-1.0_LIBRARIES}")
|
|
|
|
target_link_libraries(uldaq ${libusb-1.0_LIBRARIES})
|
|
|
|
|
|
|
|
# Rules to match UlDAQ Usb devices with libusb
|
|
|
|
install(FILES third_party/uldaq/rules/50-uldaq.rules DESTINATION
|
|
|
|
/etc/udev/rules.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ
|
|
|
|
GROUP_WRITE WORLD_READ)
|
|
|
|
endif()
|
|
|
|
endif()
|