diff options
author | luigi1111 <luigi1111w@gmail.com> | 2019-08-21 15:19:33 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2019-08-21 15:19:33 -0500 |
commit | 0ca1a51033a9767d4fb039c5289ad366610be98e (patch) | |
tree | 994853cf3054336d067f0d70868b2d575c51dd64 | |
parent | Merge pull request #5748 (diff) | |
parent | build: fix OSX static libusb check and link against static libobjc (diff) | |
download | monero-0ca1a51033a9767d4fb039c5289ad366610be98e.tar.xz |
Merge pull request #5749
45c28d8 build: fix OSX static libusb check and link against static libobjc (xiphon)
-rw-r--r-- | cmake/CheckTrezor.cmake | 4 | ||||
-rw-r--r-- | cmake/FindLibUSB.cmake | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/cmake/CheckTrezor.cmake b/cmake/CheckTrezor.cmake index 6aabdda36..d2fe60d92 100644 --- a/cmake/CheckTrezor.cmake +++ b/cmake/CheckTrezor.cmake @@ -159,7 +159,7 @@ if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON AND Protobuf_COMPILE_T set(TREZOR_LIBUSB_LIBRARIES "") if(LibUSB_COMPILE_TEST_PASSED) - list(APPEND TREZOR_LIBUSB_LIBRARIES ${LibUSB_LIBRARIES}) + list(APPEND TREZOR_LIBUSB_LIBRARIES ${LibUSB_LIBRARIES} ${LIBUSB_DEP_LINKER}) message(STATUS "Trezor compatible LibUSB found at: ${LibUSB_INCLUDE_DIRS}") endif() @@ -174,7 +174,7 @@ if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON AND Protobuf_COMPILE_T if (TREZOR_LIBUSB_LIBRARIES) list(APPEND TREZOR_DEP_LIBS ${TREZOR_LIBUSB_LIBRARIES}) - string(APPEND TREZOR_DEP_LINKER " -lusb-1.0") + string(APPEND TREZOR_DEP_LINKER " -lusb-1.0 ${LIBUSB_DEP_LINKER}") endif() endif() endif() 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) |