aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorRobin Dunn <robin@alldunn.com>2013-07-20 16:09:22 -0700
committerRobin Dunn <robin@alldunn.com>2013-07-20 16:09:22 -0700
commit5ceb7fbd139b55b8cb885577554ee59e897e19f9 (patch)
tree76830b9cc673e1259c36273d707d3aad68f13324 /setup.py
parent262e1cc90af9174d7099826068707d97209fe6e7 (diff)
Set CMAKE_OSX_ARCHITECTURES.
Fix ALTERNATIVE_QT_INCLUDE_DIR
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 964f8c98d..034047caf 100644
--- a/setup.py
+++ b/setup.py
@@ -579,13 +579,18 @@ class pyside_build(_build):
elif sys.platform == 'darwin':
if 'QTDIR' in os.environ:
# If the user has QTDIR set, then use it as a prefix for an extra include path
- cmake_cmd.append('-DALTERNATIVE_QT_INCLUDE_DIR={0}/include:{0}/lib'.format(os.environ['QTDIR']))
+ cmake_cmd.append('-DALTERNATIVE_QT_INCLUDE_DIR={0}/include'.format(os.environ['QTDIR']))
+ #:{0}/lib I had problems specifying both dirs. Is it needed? Is there some other way to do it? --Robin
else:
# Otherwise assume it is a standard install and add the
# Frameworks folder as a workaround for a cmake include problem
# http://neilweisenfeld.com/wp/120/building-pyside-on-the-mac
# https://groups.google.com/forum/#!msg/pyside/xciZZ4Hm2j8/CUmqfJptOwoJ
cmake_cmd.append('-DALTERNATIVE_QT_INCLUDE_DIR=/Library/Frameworks')
+
+ # also tell cmake which architecture to use TODO: make this optional? Allow both?
+ arch = 'i386' if platform.architecture()[0] == '32' else 'x86_64'
+ cmake_cmd.append("-DCMAKE_OSX_ARCHITECTURES:STRING={}".format(arch))
log.info("Configuring module %s (%s)..." % (extension, module_src_dir))
if run_process(cmake_cmd, log) != 0: