diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CheckTrezor.cmake | 4 | ||||
-rw-r--r-- | cmake/FindLibUSB.cmake | 6 | ||||
-rw-r--r-- | cmake/GenVersion.cmake | 4 |
3 files changed, 12 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) diff --git a/cmake/GenVersion.cmake b/cmake/GenVersion.cmake index b2ccfbc34..992539507 100644 --- a/cmake/GenVersion.cmake +++ b/cmake/GenVersion.cmake @@ -36,6 +36,7 @@ if(RET) message(WARNING "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive.") set(VERSIONTAG "unknown") + set(VERSION_IS_RELEASE "false") configure_file("src/version.cpp.in" "${TO}") else() string(SUBSTRING ${COMMIT} 0 9 COMMIT) @@ -47,6 +48,7 @@ else() if(NOT TAGGEDCOMMIT) message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.") set(VERSIONTAG "${COMMIT}") + set(VERSION_IS_RELEASE "false") else() message(STATUS "The most recent tag was at ${TAGGEDCOMMIT}") @@ -54,9 +56,11 @@ else() if(COMMIT STREQUAL TAGGEDCOMMIT) message(STATUS "You are building a tagged release") set(VERSIONTAG "release") + set(VERSION_IS_RELEASE "true") else() message(STATUS "You are ahead of or behind a tagged release") set(VERSIONTAG "${COMMIT}") + set(VERSION_IS_RELEASE "false") endif() endif() |