aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindLibUSB.cmake
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2019-07-09 21:57:48 +0000
committerxiphon <xiphon@protonmail.com>2019-07-09 22:13:59 +0000
commit45c28d8a0e1b56f71e7afc36940668d79065eae4 (patch)
treecf7b1c94aa4a293e3a0e46c55ce4bf6ff71e4b7f /cmake/FindLibUSB.cmake
parentMerge pull request #5641 (diff)
downloadmonero-45c28d8a0e1b56f71e7afc36940668d79065eae4.tar.xz
build: fix OSX static libusb check and link against static libobjc
Diffstat (limited to '')
-rw-r--r--cmake/FindLibUSB.cmake6
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)