mirror of
https://github.com/florisboard/florisboard.git
synced 2024-09-19 19:42:20 +02:00
Add hint to find_program for Rust discovery (#2567)
This commit is contained in:
parent
89ab0731d2
commit
9ff7d86a8d
@ -2,8 +2,14 @@ cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
project(florisboard)
|
||||
|
||||
find_program(RUSTUP_EXECUTABLE NAMES rustup)
|
||||
find_program(CARGO_EXECUTABLE NAMES cargo)
|
||||
if(CMAKE_HOST_WIN32)
|
||||
set(USER_HOME "$ENV{USERPROFILE}")
|
||||
else()
|
||||
set(USER_HOME "$ENV{HOME}")
|
||||
endif()
|
||||
|
||||
find_program(RUSTUP_EXECUTABLE NAMES rustup HINTS "${USER_HOME}/.cargo/bin")
|
||||
find_program(CARGO_EXECUTABLE NAMES cargo HINTS "${USER_HOME}/.cargo/bin")
|
||||
if(NOT RUSTUP_EXECUTABLE OR NOT CARGO_EXECUTABLE)
|
||||
message(FATAL_ERROR "Rust toolchain not found on this system. Please install Rust toolchain, then try again.")
|
||||
else()
|
||||
|
Loading…
Reference in New Issue
Block a user