Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #10658 from OatmealDome/qt5-cmake-prefix
BuildMacOSUniversalBinary: Place the Qt path on CMAKE_PREFIX_PATH
  • Loading branch information
JMC47 committed May 13, 2022
2 parents 333659c + 8b1be98 commit 256e3b0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions BuildMacOSUniversalBinary.py
Expand Up @@ -260,10 +260,12 @@ def build(config):
if not os.path.exists(arch):
os.mkdir(arch)

# Place Qt on the prefix path.
prefix_path = config[arch+"_qt5_path"]+';'+config[arch+"_cmake_prefix"]

env = os.environ.copy()
env["QT_DIR"] = config[arch+"_qt5_path"]
env["CMAKE_OSX_ARCHITECTURES"] = arch
env["CMAKE_PREFIX_PATH"] = config[arch+"_cmake_prefix"]
env["CMAKE_PREFIX_PATH"] = prefix_path

# Add the other architecture's prefix path to the ignore path so that
# CMake doesn't try to pick up the wrong architecture's libraries when
Expand All @@ -281,7 +283,7 @@ def build(config):
# System name needs to be specified for CMake to use
# the specified CMAKE_SYSTEM_PROCESSOR
"-DCMAKE_SYSTEM_NAME=Darwin",
"-DCMAKE_PREFIX_PATH="+config[arch+"_cmake_prefix"],
"-DCMAKE_PREFIX_PATH="+prefix_path,
"-DCMAKE_SYSTEM_PROCESSOR="+arch,
"-DCMAKE_IGNORE_PATH="+ignore_path,
"-DCMAKE_OSX_DEPLOYMENT_TARGET="
Expand Down

0 comments on commit 256e3b0

Please sign in to comment.