diff --git a/CMakeLists.txt b/CMakeLists.txt index 2399099..acaa451 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,12 +120,17 @@ else() message("Could not detect glibc version.") endif() -execute_process( - COMMAND uname -m - COMMAND tr "\n" " " - COMMAND sed "s/ //" - OUTPUT_VARIABLE MACHINENAME - ) +if ("$ENV{CROSSCOMPILE_MACHINENAME}" STREQUAL "") + execute_process( + COMMAND uname -m + COMMAND tr "\n" " " + COMMAND sed "s/ //" + OUTPUT_VARIABLE MACHINENAME + ) +else() + message("skipped machine detection; MACHINENAME is '$ENV{CROSSCOMPILE_MACHINENAME}'") + set(MACHINENAME $ENV{CROSSCOMPILE_MACHINENAME}) +endif() if (${MACHINENAME} STREQUAL "x86_64") message("Detected that the current host is x86_64. Enabling seccomp-filter.")