Fix system warnings about libusb zero-size arrays

This commit is contained in:
Jason C. Wenger 2020-05-10 12:14:13 -10:00
parent 1100f7155c
commit e350341bfd
2 changed files with 6 additions and 5 deletions

View File

@ -60,7 +60,6 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}
${Qt5Widgets_INCLUDE_DIRS}
${Qt5Bluetooth_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${LIBUSB_1_INCLUDE_DIRS}
${PROTOBUF_INCLUDE_DIR}
${OPENSSL_INCLUDE_DIR}
${RTAUDIO_INCLUDE_DIRS}
@ -78,12 +77,11 @@ file(GLOB_RECURSE autoapp_source_files ${autoapp_sources_directory}/*.ui ${autoa
add_executable(autoapp ${autoapp_source_files})
target_link_libraries(autoapp aasdk
target_link_libraries(autoapp aasdk libusb
${Boost_LIBRARIES}
${Qt5Multimedia_LIBRARIES}
${Qt5MultimediaWidgets_LIBRARIES}
${Qt5Bluetooth_LIBRARIES}
${LIBUSB_1_LIBRARIES}
${PROTOBUF_LIBRARIES}
${ZLIB_LIBRARIES}
${BCM_HOST_LIBRARIES}

View File

@ -83,8 +83,11 @@ else (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS)
if (LIBUSB_1_FOUND)
if (NOT libusb_1_FIND_QUIETLY)
message(STATUS "Found libusb-1.0:")
message(STATUS " - Includes: ${LIBUSB_1_INCLUDE_DIRS}")
message(STATUS " - Libraries: ${LIBUSB_1_LIBRARIES}")
message(STATUS " - Includes: ${LIBUSB_1_INCLUDE_DIRS}")
message(STATUS " - Libraries: ${LIBUSB_1_LIBRARIES}")
add_library(libusb INTERFACE)
target_include_directories(libusb SYSTEM INTERFACE ${LIBUSB_1_INCLUDE_DIR})
target_link_libraries(libusb INTERFACE ${LIBUSB_1_LIBRARY})
endif (NOT libusb_1_FIND_QUIETLY)
else (LIBUSB_1_FOUND)
if (libusb_1_FIND_REQUIRED)