Skip to content

Commit 2ec2421

Browse files
author
kyngchaos
committed
handle more than 2 archs for OSX universal build
git-svn-id: http://svn.osgeo.org/qgis/trunk@11548 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 444475e commit 2ec2421

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

mac/xcode/Qgis.xcodeproj/project.pbxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13137,7 +13137,7 @@
1313713137
);
1313813138
runOnlyForDeploymentPostprocessing = 0;
1313913139
shellPath = /bin/sh;
13140-
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";
13140+
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";
1314113141
showEnvVarsInLog = 0;
1314213142
};
1314313143
7256F23F0F41370A0022BE1F /* setup */ = {

mac/xcode/qgis_settings.xcconfig

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ CURRENT_PROJECT_VERSION = 2.2.0
55
// SDKSYS must be set to valid value
66
SDKSYS = leo // tig (Tiger), leo (Leopard), snow (Snow Leopard)
77

8-
ARCHS = $(NATIVE_ARCH)
8+
ARCHS = $(NATIVE_ARCH) // ppc i386 ppc64 x86_64
99
//ARCHS = ppc i386 // for universal
1010

11+
// python archs may be different
12+
ARCHS_P = $(ARCH_P_$(SDKSYS)) // in the form arch1;arch2;...
13+
1114
//////////////////////////////////////////////////////////////////////
1215
// QGIS version info & config
1316
//////////////////////////////////////////////////////////////////////
@@ -308,6 +311,9 @@ PYTHON_VERSION_snow = 2.6
308311
PYTHON_FORM_tig = fw
309312
PYTHON_FORM_leo = system
310313
PYTHON_FORM_snow = system
314+
ARCHS_P_tig = ppc;i386
315+
ARCHS_P_leo = ppc;i386
316+
ARCHS_P_snow = i386;x86_64
311317

312318
PYTHON_PREFIX_fw = /Library/Frameworks/Python.framework
313319
PYTHON_PREFIX_system = /System/Library/Frameworks/Python.framework

mac/xcode/qgis_user-template.xcconfig

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
// there is no need to set *everything* here.
88

99
//SDKSYS = leo // tig (Tiger), leo (Leopard), snow (Snow Leopard)
10-
//ARCHS = $(NATIVE_ARCH) // default
10+
//ARCHS = $(NATIVE_ARCH) // ppc i386 ppc64 x86_64
1111
//ARCHS = ppc i386 // for universal
1212

13+
// python archs may be different
14+
//ARCHS_P = $(ARCH_P_$(SDKSYS)) // in the form arch1;arch2;...
15+
1316
//////////////////////////////////////////////////////////////////////
1417
// Qt and other support
1518
//////////////////////////////////////////////////////////////////////

python/configure.py.in

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ geos_inc_dir = '@GEOS_INCLUDE_DIR@'
1313
qt_libs = ["QtCore","QtGui","QtNetwork","QtSvg","QtXml"]
1414
if sys.platform == 'darwin':
1515
qt_libs.append("QtSql")
16-
# possibility of universal build of bindings
16+
# possibility of universal build of bindings, if more than 1 arch
1717
osx_archs = '@CMAKE_OSX_ARCHITECTURES@'
18-
if osx_archs == 'ppc;i386' or osx_archs == 'i386;ppc':
18+
if osx_archs [-1] == ';' :
19+
osx_archs = osx_archs [:-1]
20+
if osx_archs.count(';') > 0:
1921
osx_universal = '@CMAKE_OSX_SYSROOT@'
2022
else:
2123
osx_universal = ''

0 commit comments

Comments
 (0)