Merge pull request #10658 from OatmealDome/qt5-cmake-prefix

BuildMacOSUniversalBinary: Place the Qt path on CMAKE_PREFIX_PATH
This commit is contained in:
JMC47 2022-05-13 03:06:42 -04:00 committed by GitHub
commit 256e3b071e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -260,10 +260,12 @@ def build(config):
if not os.path.exists(arch): if not os.path.exists(arch):
os.mkdir(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 = os.environ.copy()
env["QT_DIR"] = config[arch+"_qt5_path"]
env["CMAKE_OSX_ARCHITECTURES"] = arch 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 # 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 # 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 # System name needs to be specified for CMake to use
# the specified CMAKE_SYSTEM_PROCESSOR # the specified CMAKE_SYSTEM_PROCESSOR
"-DCMAKE_SYSTEM_NAME=Darwin", "-DCMAKE_SYSTEM_NAME=Darwin",
"-DCMAKE_PREFIX_PATH="+config[arch+"_cmake_prefix"], "-DCMAKE_PREFIX_PATH="+prefix_path,
"-DCMAKE_SYSTEM_PROCESSOR="+arch, "-DCMAKE_SYSTEM_PROCESSOR="+arch,
"-DCMAKE_IGNORE_PATH="+ignore_path, "-DCMAKE_IGNORE_PATH="+ignore_path,
"-DCMAKE_OSX_DEPLOYMENT_TARGET=" "-DCMAKE_OSX_DEPLOYMENT_TARGET="