From 319a7b842bc1184ad6aee831eb2b542fe9e5a2d0 Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 19 Apr 2016 14:10:15 -0300 Subject: [PATCH] Fix genout compilation when CMAKE_OSX_ARCHITECTURES isn't specified --- scripts/genout.cmake.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/genout.cmake.in b/scripts/genout.cmake.in index 3bbe453a0..01f12de2f 100644 --- a/scripts/genout.cmake.in +++ b/scripts/genout.cmake.in @@ -26,7 +26,12 @@ set(PLATFORM_C_FLAGS) if(APPLE) set(CMAKE_OSX_ARCHITECTURES "@CMAKE_OSX_ARCHITECTURES@") set(CMAKE_OSX_SYSROOT "@CMAKE_OSX_SYSROOT@") - set(PLATFORM_C_FLAGS -arch ${CMAKE_OSX_ARCHITECTURES} -isysroot ${CMAKE_OSX_SYSROOT}) + if(CMAKE_OSX_ARCHITECTURES) + set(PLATFORM_C_FLAGS ${PLATFORM_C_FLAGS} -arch ${CMAKE_OSX_ARCHITECTURES}) + endif() + if(CMAKE_OSX_SYSROOT) + set(PLATFORM_C_FLAGS ${PLATFORM_C_FLAGS} -isysroot ${CMAKE_OSX_SYSROOT}) + endif() endif() get_filename_component(INPUTEXT "${INPUT}" EXT)