[MacOSX] Fixing in the case -arch are not set with cairo

This commit is contained in:
Marco Serantoni 2014-01-22 19:01:36 +01:00
parent f3256a918d
commit 7e9ab70384
1 changed files with 11 additions and 6 deletions

View File

@ -38,16 +38,21 @@ find_package( BZip2 REQUIRED )
set( PREFIX ${DOWNLOAD_DIR}/cairo )
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
set( CAIRO_CFLAGS "CFLAGS=-arch ${CMAKE_OSX_ARCHITECTURES}" )
set( CAIRO_LDFLAGS "LDFLAGS=-arch ${CMAKE_OSX_ARCHITECTURES} -framework CoreServices -framework Cocoa" )
set( CAIRO_OPTS --enable-ft=no )
endif( CMAKE_OSX_ARCHITECTURES )
set( CAIRO_CFLAGS "CFLAGS=" )
set( CAIRO_LDFLAGS "LDFLAGS=-framework CoreServices -framework Cocoa" )
set( CAIRO_OPTS --enable-ft=no )
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set(CAIRO_CFLAGS "${CAIRO_CFLAGS} -fno-lto" )
endif()
if( CMAKE_OSX_ARCHITECTURES )
set( CAIRO_CFLAGS "-arch ${CMAKE_OSX_ARCHITECTURES}" )
set( CAIRO_LDFLAGS "-arch ${CMAKE_OSX_ARCHITECTURES}" )
endif( CMAKE_OSX_ARCHITECTURES )
if( CMAKE_OSX_SYSROOT )
#set( CAIRO_CFLAGS "${CAIRO_CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT}")
set( CAIRO_LDFLAGS "${CAIRO_LDFLAGS} -isysroot ${CMAKE_OSX_SYSROOT}")