Skip to content

Commit

Permalink
handle more than 2 archs for OSX universal build
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@11548 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
kyngchaos committed Sep 5, 2009
1 parent 444475e commit 2ec2421
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mac/xcode/Qgis.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13137,7 +13137,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# generate and run configure.py\n\nif [ ! -f \"$TARGET_TEMP_DIR/python/python/configure.py\" ] || [ ../../python/configure.py.in -nt \"$TARGET_TEMP_DIR/python/python/configure.py\" ] ; then\n\nif [ \"$ARCHS\" = \"ppc i386\" ] || [ \"$ARCHS\" = \"i386 ppc\" ] ; then\n\tARCHS_P=\"ppc;i386\"\nelse\n\tARCHS_P=\"$ARCHS\"\nfi\n\nif [ \"$GDAL_FORM\" = \"fw\" ] ; then\n\tGDALPATH=\"$GDAL_PREFIX/unix/lib\"\nelse\n\tGDALPATH=\"$GDAL_PREFIX/lib\"\nfi\n\nif [ \"$GEOS_FORM\" = \"fw\" ] ; then\n\tGEOSPATH=\"$GEOS_PREFIX/unix/lib\"\nelse\n\tGEOSPATH=\"$GEOS_PREFIX/lib\"\nfi\n\nsed -e \"s,@CMAKE_SOURCE_DIR@,$PROJECT_DIR/../..,\" \\\n\t-e \"s,@CMAKE_BINARY_DIR@,$TARGET_TEMP_DIR/python,\" \\\n\t-e \"s,@GDAL_INCLUDE_DIR@,$GDAL_INC,\" \\\n\t-e \"s,@GEOS_INCLUDE_DIR@,$GEOS_INC,\" \\\n\t-e \"s,@GEOS_LIB_NAME@,geos,\" \\\n\t-e \"s,@GEOS_LIB_PATH@,$GEOSPATH,\" \\\n\t-e \"s,@GDAL_LIB_NAME@,gdal,\" \\\n\t-e \"s,@GDAL_LIB_PATH@,$GDALPATH,\" \\\n\t-e \"s,@CMAKE_OSX_ARCHITECTURES@,$ARCHS_P,\" \\\n\t-e \"s,@CMAKE_OSX_SYSROOT@,$SDKROOT,\" \\\n\t-e \"s,@CMAKE_MODULE_LINKER_FLAGS@,,\" \\\n\t../../python/configure.py.in > \"$TARGET_TEMP_DIR/python/python/configure.py\"\n\nfi\n\ncd \"$TARGET_TEMP_DIR/python/python\"\nif [ ! -f core/Makefile ] || [ ! -f gui/Makefile ] || [ configure.py -nt core/Makefile ] || [ configure.py -nt gui/Makefile ] ; then\n\t$PYTHON configure.py .\nfi\n\nif [ -f core/Makefile ] && [ -f gui/Makefile ] ; then\n\texit 0\nelse\n\texit 1\nfi\n";
shellScript = "# generate and run configure.py\n\nif [ ! -f \"$TARGET_TEMP_DIR/python/python/configure.py\" ] || [ ../../python/configure.py.in -nt \"$TARGET_TEMP_DIR/python/python/configure.py\" ] ; then\n\nif [ \"$GDAL_FORM\" = \"fw\" ] ; then\n\tGDALPATH=\"$GDAL_PREFIX/unix/lib\"\nelse\n\tGDALPATH=\"$GDAL_PREFIX/lib\"\nfi\n\nif [ \"$GEOS_FORM\" = \"fw\" ] ; then\n\tGEOSPATH=\"$GEOS_PREFIX/unix/lib\"\nelse\n\tGEOSPATH=\"$GEOS_PREFIX/lib\"\nfi\n\nsed -e \"s,@CMAKE_SOURCE_DIR@,$PROJECT_DIR/../..,\" \\\n\t-e \"s,@CMAKE_BINARY_DIR@,$TARGET_TEMP_DIR/python,\" \\\n\t-e \"s,@GDAL_INCLUDE_DIR@,$GDAL_INC,\" \\\n\t-e \"s,@GEOS_INCLUDE_DIR@,$GEOS_INC,\" \\\n\t-e \"s,@GEOS_LIB_NAME@,geos,\" \\\n\t-e \"s,@GEOS_LIB_PATH@,$GEOSPATH,\" \\\n\t-e \"s,@GDAL_LIB_NAME@,gdal,\" \\\n\t-e \"s,@GDAL_LIB_PATH@,$GDALPATH,\" \\\n\t-e \"s,@CMAKE_OSX_ARCHITECTURES@,$ARCHS_P,\" \\\n\t-e \"s,@CMAKE_OSX_SYSROOT@,$SDKROOT,\" \\\n\t-e \"s,@CMAKE_MODULE_LINKER_FLAGS@,,\" \\\n\t../../python/configure.py.in > \"$TARGET_TEMP_DIR/python/python/configure.py\"\n\nfi\n\ncd \"$TARGET_TEMP_DIR/python/python\"\nif [ ! -f core/Makefile ] || [ ! -f gui/Makefile ] || [ configure.py -nt core/Makefile ] || [ configure.py -nt gui/Makefile ] ; then\n\t$PYTHON configure.py .\nfi\n\nif [ -f core/Makefile ] && [ -f gui/Makefile ] ; then\n\texit 0\nelse\n\texit 1\nfi\n";
showEnvVarsInLog = 0;
};
7256F23F0F41370A0022BE1F /* setup */ = {
Expand Down
8 changes: 7 additions & 1 deletion mac/xcode/qgis_settings.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ CURRENT_PROJECT_VERSION = 2.2.0
// SDKSYS must be set to valid value
SDKSYS = leo // tig (Tiger), leo (Leopard), snow (Snow Leopard)

ARCHS = $(NATIVE_ARCH)
ARCHS = $(NATIVE_ARCH) // ppc i386 ppc64 x86_64
//ARCHS = ppc i386 // for universal

// python archs may be different
ARCHS_P = $(ARCH_P_$(SDKSYS)) // in the form arch1;arch2;...

//////////////////////////////////////////////////////////////////////
// QGIS version info & config
//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -308,6 +311,9 @@ PYTHON_VERSION_snow = 2.6
PYTHON_FORM_tig = fw
PYTHON_FORM_leo = system
PYTHON_FORM_snow = system
ARCHS_P_tig = ppc;i386
ARCHS_P_leo = ppc;i386
ARCHS_P_snow = i386;x86_64

PYTHON_PREFIX_fw = /Library/Frameworks/Python.framework
PYTHON_PREFIX_system = /System/Library/Frameworks/Python.framework
Expand Down
5 changes: 4 additions & 1 deletion mac/xcode/qgis_user-template.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
// there is no need to set *everything* here.

//SDKSYS = leo // tig (Tiger), leo (Leopard), snow (Snow Leopard)
//ARCHS = $(NATIVE_ARCH) // default
//ARCHS = $(NATIVE_ARCH) // ppc i386 ppc64 x86_64
//ARCHS = ppc i386 // for universal

// python archs may be different
//ARCHS_P = $(ARCH_P_$(SDKSYS)) // in the form arch1;arch2;...

//////////////////////////////////////////////////////////////////////
// Qt and other support
//////////////////////////////////////////////////////////////////////
Expand Down
6 changes: 4 additions & 2 deletions python/configure.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ geos_inc_dir = '@GEOS_INCLUDE_DIR@'
qt_libs = ["QtCore","QtGui","QtNetwork","QtSvg","QtXml"]
if sys.platform == 'darwin':
qt_libs.append("QtSql")
# possibility of universal build of bindings
# possibility of universal build of bindings, if more than 1 arch
osx_archs = '@CMAKE_OSX_ARCHITECTURES@'
if osx_archs == 'ppc;i386' or osx_archs == 'i386;ppc':
if osx_archs [-1] == ';' :
osx_archs = osx_archs [:-1]
if osx_archs.count(';') > 0:
osx_universal = '@CMAKE_OSX_SYSROOT@'
else:
osx_universal = ''
Expand Down

0 comments on commit 2ec2421

Please sign in to comment.