From 8024d43e6f45a90d53e30784fca82a42fc70b297 Mon Sep 17 00:00:00 2001 From: ComputeryPony Date: Sun, 16 Mar 2025 18:57:44 -0500 Subject: [PATCH] trezor: fix cmake variables --- cmake/CheckTrezor.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/CheckTrezor.cmake b/cmake/CheckTrezor.cmake index 74f76fe4a..8bad90713 100644 --- a/cmake/CheckTrezor.cmake +++ b/cmake/CheckTrezor.cmake @@ -126,13 +126,13 @@ if(Protobuf_FOUND AND USE_DEVICE_TREZOR) list(APPEND _proto_files "messages-debug.proto") endif () - set(_proto_include_dir "${CMAKE_SOURCE_DIR}/src/device_trezor/trezor/protob") + set(_proto_include_dir "${CMAKE_CURRENT_LIST_DIR}/../src/device_trezor/trezor/protob") set(_proto_files_absolute) foreach(file IN LISTS _proto_files) list(APPEND _proto_files_absolute "${_proto_include_dir}/${file}") endforeach () - set(_proto_out_dir "${CMAKE_SOURCE_DIR}/src/device_trezor/trezor/messages") + set(_proto_out_dir "${CMAKE_CURRENT_LIST_DIR}/../src/device_trezor/trezor/messages") execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} --cpp_out "${_proto_out_dir}" "-I${_proto_include_dir}" ${_proto_files_absolute} RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR) if(RET) trezor_fatal_msg("Trezor: protobuf messages could not be (re)generated (err=${RET}). OUT: ${OUT}, ERR: ${ERR}.")