Fix genout compilation when CMAKE_OSX_ARCHITECTURES isn't specified

This commit is contained in:
David Capello 2016-04-19 14:10:15 -03:00
parent 50d41533d2
commit 319a7b842b

View File

@ -26,7 +26,12 @@ set(PLATFORM_C_FLAGS)
if(APPLE) if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "@CMAKE_OSX_ARCHITECTURES@") set(CMAKE_OSX_ARCHITECTURES "@CMAKE_OSX_ARCHITECTURES@")
set(CMAKE_OSX_SYSROOT "@CMAKE_OSX_SYSROOT@") 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() endif()
get_filename_component(INPUTEXT "${INPUT}" EXT) get_filename_component(INPUTEXT "${INPUT}" EXT)