From 8b1be98a964754bf5728650ffd7e3a8bde1c260b Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Thu, 12 May 2022 23:04:33 -0400 Subject: [PATCH] BuildMacOSUniversalBinary: Place the Qt path on CMAKE_PREFIX_PATH --- BuildMacOSUniversalBinary.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/BuildMacOSUniversalBinary.py b/BuildMacOSUniversalBinary.py index 0e01057b27..2425b5bea9 100755 --- a/BuildMacOSUniversalBinary.py +++ b/BuildMacOSUniversalBinary.py @@ -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 @@ -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="