fix: properly detect host env. (#628)

This commit is contained in:
hexlocation 2026-03-06 01:54:40 +01:00 committed by GitHub
parent b7b29c0b7b
commit 34c22f6ab5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -88,7 +88,7 @@ target_link_libraries(MinecraftClient PRIVATE
>
)
if(WIN32)
if(CMAKE_HOST_WIN32)
message(STATUS "Starting redist copy...")
execute_process(
COMMAND robocopy.exe
@ -117,7 +117,7 @@ if(WIN32)
/S /MT /R:0 /W:0 /NP
/XF "*.h" "*.xml" "*.lang" "*.bat"
)
elseif(UNIX)
elseif(CMAKE_HOST_UNIX)
message(STATUS "Starting redist copy...")
execute_process(
COMMAND rsync -av "${CMAKE_CURRENT_SOURCE_DIR}/x64/Release/" "${CMAKE_CURRENT_BINARY_DIR}/"