diff options
author | jbeich <jbeich@FreeBSD.org> | 2017-01-06 06:58:02 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2017-01-06 06:58:02 +0800 |
commit | 322e5438d328cec068335735a492ee7d96d04055 (patch) | |
tree | 89becbb47fd3ca1d6f3fd97d6677e0b01732e970 /comms/gnuradio/files | |
parent | 022e706980ac9daa5912f882d2151101a3ab1eae (diff) | |
download | freebsd-ports-gnome-322e5438d328cec068335735a492ee7d96d04055.tar.gz freebsd-ports-gnome-322e5438d328cec068335735a492ee7d96d04055.tar.zst freebsd-ports-gnome-322e5438d328cec068335735a492ee7d96d04055.zip |
Assume "pkg-config libusb*" works after 9.x EOL
FreeBSD appears to use different pkg-config name for 0.1.x API but it
doesn't matter much as 0.1, 1.0 and 2.0 share CFLAGS/LIBS.
Diffstat (limited to 'comms/gnuradio/files')
-rw-r--r-- | comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake b/comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake index e174ca320d0f..4efb096fdaca 100644 --- a/comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake +++ b/comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake @@ -1,51 +1,5 @@ --- cmake/Modules/FindUSB.cmake.orig 2015-04-13 14:32:43 UTC +++ cmake/Modules/FindUSB.cmake -@@ -1,20 +1,30 @@ - if(NOT LIBUSB_FOUND) -- pkg_check_modules (LIBUSB_PKG libusb-1.0) -- find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h -- PATHS -- ${LIBUSB_PKG_INCLUDE_DIRS} -- /usr/include/libusb-1.0 -- /usr/include -- /usr/local/include -- ) -- -- find_library(LIBUSB_LIBRARIES NAMES usb-1.0 usb -- PATHS -- ${LIBUSB_PKG_LIBRARY_DIRS} -- /usr/lib -- /usr/local/lib -- ) -+ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") -+ message(status "--- Looking for FreeBSD usb") -+ find_library(LIBUSB_LIBRARIES NAMES usb -+ PATHS -+ ${LIBUSB_PKG_LIBRARY_DIRS} -+ /usr/lib -+ ) -+ else() -+ message(status "--- LIBUSB_LIBRARIES ${LIBUSB_LIBRARIES}") -+ pkg_check_modules (LIBUSB_PKG libusb-1.0) -+ find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h -+ PATHS -+ ${LIBUSB_PKG_INCLUDE_DIRS} -+ /usr/include/libusb-1.0 -+ /usr/include -+ /usr/local/include -+ ) - -+ find_library(LIBUSB_LIBRARIES NAMES usb-1.0 usb -+ PATHS -+ ${LIBUSB_PKG_LIBRARY_DIRS} -+ /usr/lib -+ /usr/local/lib -+ ) -+ endif() -+ - if(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) - set(LIBUSB_FOUND TRUE CACHE INTERNAL "libusb-1.0 found") - message(STATUS "Found libusb-1.0: ${LIBUSB_INCLUDE_DIR}, ${LIBUSB_LIBRARIES}") @@ -23,6 +33,17 @@ else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRA message(STATUS "libusb-1.0 not found.") endif(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) |