diff options
author | db <db@FreeBSD.org> | 2017-01-08 06:57:43 +0800 |
---|---|---|
committer | db <db@FreeBSD.org> | 2017-01-08 06:57:43 +0800 |
commit | 2c11dd642503cb9fa1e173edfc645d894b927679 (patch) | |
tree | 9c954da9452f33655ef0b204817179a61221c309 /comms/gnuradio | |
parent | d26fbbd9266d5ddaebe8c56eb25c895299247ad0 (diff) | |
download | freebsd-ports-gnome-2c11dd642503cb9fa1e173edfc645d894b927679.tar.gz freebsd-ports-gnome-2c11dd642503cb9fa1e173edfc645d894b927679.tar.zst freebsd-ports-gnome-2c11dd642503cb9fa1e173edfc645d894b927679.zip |
Restore change made by @jbeich made in rev 430669 accidentally removed.
N.B. the INCLUDE(CheckFunctionExists) is now needed here.
Diffstat (limited to 'comms/gnuradio')
-rw-r--r-- | comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake b/comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake index c95446776417..2dab066f6acf 100644 --- a/comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake +++ b/comms/gnuradio/files/patch-cmake_Modules_FindUSB.cmake @@ -1,54 +1,6 @@ --- cmake/Modules/FindUSB.cmake.orig 2016-09-02 04:16:12 UTC +++ cmake/Modules/FindUSB.cmake -@@ -1,20 +1,32 @@ - 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") -+ set (LIBUSB_INCLUDE_DIR ${LOCALBASE}/include) -+ 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() -+message( status "--- LIBUSB_INCLUDE_DIR ${LIBUSB_INCLUDE_DIR} LIBUSB_LIBRARIES ${LIBUSB_LIBRARIES}") -+ - 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}") -@@ -22,6 +34,19 @@ else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRA +@@ -22,6 +22,19 @@ else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRA set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found") message(STATUS "libusb-1.0 not found.") endif(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) |