From dc71f481ff32fa474e030ceb0b33def4fa9edc6a Mon Sep 17 00:00:00 2001 From: Joost Nieuwenhuijse Date: Wed, 26 Feb 2025 22:17:08 +0100 Subject: [PATCH] build: Fix apple-non-apple cross building When cross compiling for an apple platform on a non-apple platform (or the reverse), `if(APPLE)` in line 32 should refer to the target platform. Without importing the `APPLE` variable, it refers to the host platform. Reviewed-by: John Bowler Signed-off-by: Cosmin Truta --- scripts/cmake/AUTHORS.md | 1 + scripts/cmake/genout.cmake.in | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/AUTHORS.md b/scripts/cmake/AUTHORS.md index c09821786..c25a50591 100644 --- a/scripts/cmake/AUTHORS.md +++ b/scripts/cmake/AUTHORS.md @@ -29,6 +29,7 @@ Author List * Jeremy Maitin-Shepard * John Bowler * Jon Creighton + * Joost Nieuwenhuijse * Kyle Bentley * Martin Storsjö * Owen Rudge diff --git a/scripts/cmake/genout.cmake.in b/scripts/cmake/genout.cmake.in index d4a333282..242aa8ab3 100644 --- a/scripts/cmake/genout.cmake.in +++ b/scripts/cmake/genout.cmake.in @@ -1,7 +1,7 @@ # genout.cmake.in # Generate .out from .c with awk (generic), based upon the automake logic. -# Copyright (c) 2022-2024 Cosmin Truta +# Copyright (c) 2022-2025 Cosmin Truta # Copyright (c) 2016 Glenn Randers-Pehrson # Written by Roger Leigh, 2016 # @@ -16,6 +16,7 @@ set(SRCDIR "@CMAKE_CURRENT_SOURCE_DIR@") set(BINDIR "@CMAKE_CURRENT_BINARY_DIR@") +set(APPLE "@APPLE@") set(AWK "@AWK@") set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@") set(CMAKE_C_FLAGS @CMAKE_C_FLAGS@)