build: fix OSX static libusb check and link against static libobjc

This commit is contained in:
xiphon 2019-07-09 21:57:48 +00:00
parent 6335509727
commit 45c28d8a0e
2 changed files with 8 additions and 2 deletions

View file

@ -119,6 +119,12 @@ if ( LibUSB_FOUND )
find_library(IOKIT IOKit)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${IOKIT})
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${COREFOUNDATION})
if(STATIC)
find_library(OBJC objc.a)
set(LIBUSB_DEP_LINKER ${OBJC})
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LIBUSB_DEP_LINKER})
endif()
endif()
endif()
if (WIN32)