From e4ad766315879e1ff05bb111229f073f8f0ed68e Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Mon, 10 Oct 2022 21:30:02 +0200 Subject: PassFish: Initial Commit Well, that's a lie. But nobody needs to see all the iterations I decided to sweep under the rug. That said, I think the repo is, while not clean, clean enough now, to not be embarrassed by uploading it to github. --- cmake/FindCargo.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 cmake/FindCargo.cmake (limited to 'cmake/FindCargo.cmake') diff --git a/cmake/FindCargo.cmake b/cmake/FindCargo.cmake new file mode 100644 index 0000000..6627d86 --- /dev/null +++ b/cmake/FindCargo.cmake @@ -0,0 +1,10 @@ +include(FindPackageHandleStandardArgs) +find_program(Cargo_EXECUTABLE cargo) +execute_process(COMMAND "${Cargo_EXECUTABLE}" --version + OUTPUT_VARIABLE Cargo_VERSION_OUTPUT) +STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" + Cargo_VERSION "${Cargo_VERSION_OUTPUT}") +find_package_handle_standard_args(Cargo + REQUIRED_VARS Cargo_EXECUTABLE + VERSION_VAR Cargo_VERSION) +mark_as_advanced(Cargo_EXECUTABLE) -- cgit v1.2.3