--- CMakeLists.txt.orig	2024-11-08 08:33:13 UTC
+++ CMakeLists.txt
@@ -887,7 +887,7 @@ endif()
 if(RUST_NIGHTLY)
   list(APPEND CARGO_BUILD -Z build-std=std,panic_abort)
 endif()
-if(NOT CMAKE_OSX_ARCHITECTURES AND (DEFINED CMAKE_RUST_COMPILER_TARGET OR RUST_NIGHTLY))
+if(NOT CMAKE_OSX_ARCHITECTURES AND (DEFINED CMAKE_RUST_COMPILER_TARGET))
   if(DEFINED CMAKE_RUST_COMPILER_TARGET)
     list(APPEND CARGO_TEST --target ${CMAKE_RUST_COMPILER_TARGET})
     set(RUST_TARGET ${CMAKE_RUST_COMPILER_TARGET})
@@ -948,13 +948,6 @@ if(NOT CMAKE_OSX_ARCHITECTURES)
     )
     list(APPEND RUST_OUTPUTS "${PROJECT_BINARY_DIR}/${CARGO_BUILD_DIR}/${LIBRARY_NAME}")
   endforeach()
-  add_custom_command(
-    OUTPUT ${RUST_OUTPUTS}
-    COMMAND ${CARGO_BUILD}
-    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
-    USES_TERMINAL
-    DEPENDS ${RUST_SRC}
-  )
 else()
   foreach(rust_target ${RUST_TARGETS})
     set(LIBRARY_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}ddnet_${rust_target}${CMAKE_STATIC_LIBRARY_SUFFIX}")
