From: Simon Tatham Date: Thu, 1 Apr 2021 16:54:51 +0000 (+0100) Subject: Don't try to build the icons when cross-compiling. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=e763b9ead86df6a92666525f8d2ed0385e251c61;p=sgt-puzzles.git Don't try to build the icons when cross-compiling. The puzzle icons are built by compiling and running a preliminary set of puzzle binaries. We can't do that if the binaries won't run on the build host. --- diff --git a/cmake/platforms/unix.cmake b/cmake/platforms/unix.cmake index 49a1b1f..aeff797 100644 --- a/cmake/platforms/unix.cmake +++ b/cmake/platforms/unix.cmake @@ -28,6 +28,12 @@ set(platform_gui_libs ${GTK_LIBRARIES}) set(platform_libs -lm) set(build_icons TRUE) +if(CMAKE_CROSSCOMPILING) + # The puzzle icons are built by compiling and running a preliminary + # set of puzzle binaries. We can't do that if the binaries won't run + # on the build host. + set(build_icons FALSE) +endif() if(DEFINED STRICT AND (CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang"))