Disable Trezor by default

Trezor support currently doesn't work (Trezor's hardware wallet is
hard-coded for a Monero net-id), and this saves needing to muck around
with protobuf.
This commit is contained in:
Jason Rhinelander 2021-01-08 15:42:33 -04:00
parent 5c1e1a1f8c
commit eca6b6ad8d
4 changed files with 31 additions and 22 deletions

View File

@ -247,6 +247,8 @@ if (BUILD_TESTS)
add_definitions(-DUNIT_TEST)
endif()
OPTION(USE_DEVICE_TREZOR "Build Trezor support (currently non-functional)" OFF)
find_package(Git)
if(NOT MANUAL_SUBMODULES)
if(GIT_FOUND)
@ -496,8 +498,9 @@ add_subdirectory(external)
target_compile_definitions(easylogging PRIVATE AUTO_INITIALIZE_EASYLOGGINGPP)
# Trezor support check
include(CheckTrezor)
if(USE_DEVICE_TREZOR)
include(CheckTrezor)
endif()
if(MSVC)
add_definitions("/bigobj /MP /W3 /GS- /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /DGTEST_HAS_TR1_TUPLE=0 /FIinline_c.h /D__SSE4_1__")

View File

@ -1,4 +1,3 @@
OPTION(USE_DEVICE_TREZOR "Trezor support compilation" ON)
OPTION(USE_DEVICE_TREZOR_LIBUSB "Trezor LibUSB compilation" ON)
OPTION(USE_DEVICE_TREZOR_UDP_RELEASE "Trezor UdpTransport in release mode" OFF)
OPTION(USE_DEVICE_TREZOR_DEBUG "Trezor Debugging enabled" OFF)

View File

@ -540,25 +540,27 @@ endif()
set(protobuf_extra "")
if(ANDROID)
set(protobuf_extra "LDFLAGS=-llog")
if(USE_DEVICE_TREZOR)
set(protobuf_extra "")
if(ANDROID)
set(protobuf_extra "LDFLAGS=-llog")
endif()
build_external(protobuf
CONFIGURE_COMMAND
./configure ${cross_host} --disable-shared --prefix=${DEPS_DESTDIR} --with-pic
"CC=${deps_cc}" "CXX=${deps_cxx}" "CFLAGS=${deps_CFLAGS}" "CXXFLAGS=${deps_CXXFLAGS}"
${cross_extra} ${protobuf_extra}
"CPP=${deps_cc} -E" "CXXCPP=${deps_cxx} -E"
"CC_FOR_BUILD=${deps_cc}" "CXX_FOR_BUILD=${deps_cxx}" # Thanks Google for making people hunt for undocumented magic variables
BUILD_BYPRODUCTS
${DEPS_DESTDIR}/lib/libprotobuf-lite.a
${DEPS_DESTDIR}/lib/libprotobuf.a
${DEPS_DESTDIR}/lib/libprotoc.a
${DEPS_DESTDIR}/include/google/protobuf
)
add_static_target(protobuf_lite protobuf_external libprotobuf-lite.a)
add_static_target(protobuf_bloated protobuf_external libprotobuf.a)
endif()
build_external(protobuf
CONFIGURE_COMMAND
./configure ${cross_host} --disable-shared --prefix=${DEPS_DESTDIR} --with-pic
"CC=${deps_cc}" "CXX=${deps_cxx}" "CFLAGS=${deps_CFLAGS}" "CXXFLAGS=${deps_CXXFLAGS}"
${cross_extra} ${protobuf_extra}
"CPP=${deps_cc} -E" "CXXCPP=${deps_cxx} -E"
"CC_FOR_BUILD=${deps_cc}" "CXX_FOR_BUILD=${deps_cxx}" # Thanks Google for making people hunt for undocumented magic variables
BUILD_BYPRODUCTS
${DEPS_DESTDIR}/lib/libprotobuf-lite.a
${DEPS_DESTDIR}/lib/libprotobuf.a
${DEPS_DESTDIR}/lib/libprotoc.a
${DEPS_DESTDIR}/include/google/protobuf
)
add_static_target(protobuf_lite protobuf_external libprotobuf-lite.a)
add_static_target(protobuf_bloated protobuf_external libprotobuf.a)

View File

@ -95,6 +95,11 @@ function(combine_archives output_archive)
endfunction(combine_archives)
if (STATIC AND BUILD_STATIC_DEPS)
set(merged_protobuf)
if(TARGET protobuf_lite)
set(merged_protobuf protobuf_lite)
endif()
combine_archives(wallet_merged
wallet_api
wallet
@ -124,7 +129,7 @@ if (STATIC AND BUILD_STATIC_DEPS)
expat
libunbound
sqlite3
protobuf_lite
${merged_protobuf}
sodium
libzmq
CURL::libcurl