diff options
| author | Andreas Grois <andi@grois.info> | 2022-10-10 21:30:02 +0200 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2022-10-10 21:37:15 +0200 |
| commit | e4ad766315879e1ff05bb111229f073f8f0ed68e (patch) | |
| tree | 4b043ff47c78b2c00c80c94ebda622c32c8b6d3d /cmake | |
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.
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/FindCargo.cmake | 10 | ||||
| -rw-r--r-- | cmake/FindRust.cmake | 13 | ||||
| -rw-r--r-- | cmake/FindRustQtBindingGenerator.cmake | 5 |
3 files changed, 28 insertions, 0 deletions
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) diff --git a/cmake/FindRust.cmake b/cmake/FindRust.cmake new file mode 100644 index 0000000..f87ca02 --- /dev/null +++ b/cmake/FindRust.cmake @@ -0,0 +1,13 @@ +include(FindPackageHandleStandardArgs) +find_program(Rust_EXECUTABLE rustc) +execute_process(COMMAND "${Rust_EXECUTABLE}" --version + OUTPUT_VARIABLE Rust_VERSION_OUTPUT) +STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" + Rust_VERSION "${Rust_VERSION_OUTPUT}") +message(STATUS "Rust Exe=${Rust_EXECUTABLE}") +message(STATUS "Rust Version=${Rust_VERSION}") +message(STATUS "Full Rust Version= ${Rust_VERSION_OUTPUT}") +find_package_handle_standard_args(Rust + REQUIRED_VARS Rust_EXECUTABLE + VERSION_VAR Rust_VERSION) +mark_as_advanced(Rust_EXECUTABLE) diff --git a/cmake/FindRustQtBindingGenerator.cmake b/cmake/FindRustQtBindingGenerator.cmake new file mode 100644 index 0000000..dc345c0 --- /dev/null +++ b/cmake/FindRustQtBindingGenerator.cmake @@ -0,0 +1,5 @@ +include(FindPackageHandleStandardArgs) +find_program(RustQtBindingGenerator_EXECUTABLE rust_qt_binding_generator HINTS ~/bin) +find_package_handle_standard_args(RustQtBindingGenerator + REQUIRED_VARS RustQtBindingGenerator_EXECUTABLE) +mark_as_advanced(RustQtBindingGenerator_EXECUTABLE) |
