Only use LIBUSB_LINK_LIBRARIES if it exists
FindPkgConfig only sets <XXX>_LINK_LIBRARIES in CMake >= 3.12. Signed-off-by: Clayton Smith <argilo@gmail.com> Signed-off-by: Dimitri Stolnikov <horiz0n@gmx.net>
This commit is contained in:
parent
b85f037d85
commit
af33886796
|
@ -71,7 +71,9 @@ find_package(PkgConfig)
|
|||
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(LIBUSB libusb-1.0 IMPORTED_TARGET)
|
||||
set(LIBUSB_LIBRARIES "${LIBUSB_LINK_LIBRARIES}")
|
||||
if(LIBUSB_LINK_LIBRARIES)
|
||||
set(LIBUSB_LIBRARIES "${LIBUSB_LINK_LIBRARIES}")
|
||||
endif()
|
||||
else()
|
||||
set(LIBUSB_LIBRARIES "" CACHE STRING "manual libusb path")
|
||||
set(LIBUSB_INCLUDE_DIRS "" CACHE STRING "manual libusb includepath")
|
||||
|
|
Loading…
Reference in New Issue