Update hamlib and libusb package finders for Linux

This commit is contained in:
Bill Somerville 2021-04-13 02:02:49 +01:00
parent 63e485e819
commit 00f1d7577a
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
2 changed files with 7 additions and 3 deletions

View File

@ -28,14 +28,16 @@ if (NOT hamlib_PKGCONF_FOUND)
else ()
set (hamlib_LIBRARIES ${hamlib_LIBRARIES};m;dl)
endif ()
elseif (UNIX AND NOT APPLE)
set (hamlib_LIBRARIES ${hamlib_PKGCONF_STATIC_LDFLAGS})
endif ()
if (hamlib_FOUND AND NOT TARGET hamlib::hamlib)
add_library (hamlib::hamlib UNKNOWN IMPORTED)
set_target_properties (hamlib::hamlib PROPERTIES
IMPORTED_LOCATION "${hamlib_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${hamlib_PKGCONF_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${hamlib_INCLUDE_DIRS}"
INTERFACE_COMPILE_OPTIONS "${hamlib_PKGCONF_STATIC_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${hamlib_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${hamlib_LIBRARIES}"
)
endif ()

View File

@ -13,6 +13,8 @@
# libusb::libusb - The libusb library
#
include (LibFindMacros)
if (WIN32)
# Use path suffixes on MS Windows as we probably shouldn't
# trust the PATH envvar. PATH will still be searched to find the
@ -25,7 +27,7 @@ if (WIN32)
endif ()
libfind_pkg_detect (libusb libusb-1.0
FIND_PATH libusb.h PATH_SUFFIXES libusb-1.0
FIND_LIBRARY libusb-1.0 ${_library_options}
FIND_LIBRARY usb-1.0 ${_library_options}
)
libfind_process (libusb)