Skip to content

Commit 16d513a

Browse files
committed
[PR 128] CMake: Fix BLS signature library dependence on $HOME
Instead, allow the build system to provide Cargo, and rely on the build system to set the PATH appropriately. We could possibly keep the error message if cargo is not found, but I believe the error output of add_custom_target() will be useful enough if cargo is missing.
1 parent e2457f9 commit 16d513a

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

deps/bls-signatures.cmake

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,6 @@
33
# SPDX-License-Identifier: Apache-2.0
44
#
55

6-
if(EXISTS "$ENV{HOME}/.cargo/bin/cargo")
7-
message(STATUS "Rust cargo is present")
8-
else()
9-
message(STATUS "No Rust cargo found")
10-
message(WARNING
11-
"Rust is required for building BLS dependencies.\n"
12-
"You can install rust-lang via the following command:\n"
13-
"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
14-
)
15-
endif()
16-
176
set(BUILD_TYPE "release")
187

198
set(BLS_BUILD_PATH
@@ -27,7 +16,7 @@ set(BLS_LIBRARY
2716
add_custom_target(
2817
cargo_build
2918
ALL
30-
COMMAND $ENV{HOME}/.cargo/bin/cargo build -p bls-signatures-ffi --target-dir ${BLS_BUILD_PATH} --${BUILD_TYPE}
19+
COMMAND cargo build -p bls-signatures-ffi --target-dir ${BLS_BUILD_PATH} --${BUILD_TYPE}
3120
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/deps/bls-signatures"
3221
BYPRODUCTS ${BLS_LIBRARY}
3322
)

0 commit comments

Comments
 (0)