diff options
author | xiphon <xiphon@protonmail.com> | 2019-07-09 21:57:48 +0000 |
---|---|---|
committer | xiphon <xiphon@protonmail.com> | 2019-07-09 22:13:59 +0000 |
commit | 45c28d8a0e1b56f71e7afc36940668d79065eae4 (patch) | |
tree | cf7b1c94aa4a293e3a0e46c55ce4bf6ff71e4b7f /cmake/FindLibUSB.cmake | |
parent | Merge pull request #5641 (diff) | |
download | monero-45c28d8a0e1b56f71e7afc36940668d79065eae4.tar.xz |
build: fix OSX static libusb check and link against static libobjc
Diffstat (limited to 'cmake/FindLibUSB.cmake')
-rw-r--r-- | cmake/FindLibUSB.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/FindLibUSB.cmake b/cmake/FindLibUSB.cmake index c7e09d4c0..79d8fba75 100644 --- a/cmake/FindLibUSB.cmake +++ b/cmake/FindLibUSB.cmake @@ -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) |