diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2016-06-13 17:15:04 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2016-06-16 09:40:32 +0000 |
commit | c764273e64896215730e44eb907cd3535596ade4 (patch) | |
tree | 1837b351e332b1fd4118053285fa0cb374e43335 /setup.py | |
parent | 6b8818ccdaba58fb1309be32d2263c14f3ea08b7 (diff) |
Fix OS/X inclusion of framework headers.
The recent change that made use of framework headers on OS/X did
not work with homebrew Qt, and it didn't work with official builds
either, because neither of the chosen include folders contained
all the necessary headers to lead to a successful build.
Fortunately shiboken actually supports being passed multiple include
locations, separated by a colon on OS/X, and a semicolon on Windows.
This patch makes sure to always pass the Qt include folder, and in
case if the Qt build is a framework build, also passes the root
frameworks location, with headers found by shiboken under
frameworkName.framewework/Headers.
This works for homebrew builds, official builds and custom
non-installed prefix / in-source builds of Qt.
Change-Id: I47b24e197839883de2ab873461efc1f4d4d33743
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -633,11 +633,17 @@ class pyside_build(_build): cmake_cmd.append("-DUSE_PYTHON_VERSION=3.4") if sys.platform == 'darwin': - # When using Qt from QtCompany installers, headers are under framework directories + # Shiboken supports specifying multiple include paths separated by a colon on *nix + # systems. + # In a framework build, two paths should be included: + # path_to_qt/lib -> which contains framework folders with headers, and + # path_to_qt/include -> which contains headers for static libraries. + # A non-framework build contains all headers in the path_to_qt/include folder. + path_separator = ":" + includes_dir = '-DALTERNATIVE_QT_INCLUDE_DIR=' + self.qtinfo.headers_dir if os.path.isdir(self.qtinfo.headers_dir + "/../lib/QtCore.framework"): - cmake_cmd.append('-DALTERNATIVE_QT_INCLUDE_DIR=' + self.qtinfo.headers_dir + "/../lib/") - else: - cmake_cmd.append('-DALTERNATIVE_QT_INCLUDE_DIR=' + self.qtinfo.headers_dir) + includes_dir += path_separator + self.qtinfo.headers_dir + "/../lib/" + cmake_cmd.append(includes_dir) if OPTION_OSXARCH: # also tell cmake which architecture to use |