cmake updates

This commit is contained in:
naci
2025-04-29 11:28:52 +03:00
parent fc35be27eb
commit 7221e848bd
2 changed files with 14 additions and 6 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ FetchContent_Declare(linux-pe SYSTEM
)
FetchContent_MakeAvailable(linux-pe)
if(ICED_FOUND) # NOTE: unnamed condition
if(ICED_NOT_FOUND) # NOTE: unnamed condition
message(STATUS "Fetching Zydis (v4.1.0)...")
FetchContent_Declare(Zydis SYSTEM
GIT_REPOSITORY
+13 -5
View File
@@ -1,20 +1,28 @@
if (BUILD_WITH_ZYDIS)
message(STATUS "BUILD_WITH_ZYDIS=ON; forcing Zydis backend and skipping Cargo lookup")
add_compile_definitions(ICED_NOT_FOUND)
return()
endif()
find_program(CARGO_EXECUTABLE cargo)
if (NOT CARGO_EXECUTABLE)
message("Cargo not found. Default to Zydis")
set(ICED_NOT_FOUND TRUE CACHE BOOL "Rust/Cargo found => build the iced (Rust) backend")
message("Cargo not found. Default to Zydis.")
set(ICED_NOT_FOUND TRUE CACHE BOOL "Rust/Cargo not found => building with the Zydis backend")
add_compile_definitions(ICED_NOT_FOUND)
return()
endif()
message("Cargo found. Default to Iced")
message("Cargo found. Default to Iced.")
include(FetchContent)
FetchContent_Declare(
Corrosion
GIT_REPOSITORY https://github.com/NaC-L/corrosion.git
GIT_REPOSITORY https://github.com/NaC-L/corrosion.git # some issue with linker, i forgot, enabling flag should help?, hopefully my patch doesnt break anything
GIT_TAG 8b991b7 # Optionally specify a commit hash, version tag or branch here
)
@@ -23,5 +31,5 @@ FetchContent_MakeAvailable(Corrosion)
corrosion_import_crate(MANIFEST_PATH icpped_rust/Cargo.toml)
set(ICED_FOUND TRUE CACHE BOOL "Rust/Cargo found => build the iced (Rust) backend")
set(ICED_FOUND TRUE CACHE BOOL "Rust/Cargo found => building with the Iced (Rust) backend")
add_compile_definitions(ICED_FOUND)