mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-12-24 00:40:33 +00:00
Merge pull request #1075 from c64kernal/dev_xcodebp
Fixes to the build script for macOS
This commit is contained in:
commit
3dec4b7fb3
@ -217,14 +217,30 @@ def RunCMake(context, force, extraArgs = None):
|
||||
else:
|
||||
generator = "Visual Studio 14 2015 Win64"
|
||||
|
||||
if generator is not None:
|
||||
generator = '-G "{gen}"'.format(gen=generator)
|
||||
|
||||
# On macOS default to Xcode
|
||||
if generator is None and MacOS():
|
||||
generator = "Xcode"
|
||||
|
||||
|
||||
multiproc = "-j{procs}"
|
||||
if Windows():
|
||||
multiproc = "/M:{procs}"
|
||||
|
||||
if generator == "Xcode":
|
||||
multiproc = "-jobs {procs} -parallelizeTargets"
|
||||
|
||||
multiproc = multiproc.format(procs=context.numJobs)
|
||||
|
||||
# On MacOS, enable the use of @rpath for relocatable builds.
|
||||
osx_rpath = None
|
||||
if MacOS():
|
||||
osx_rpath = "-DCMAKE_MACOSX_RPATH=ON"
|
||||
|
||||
|
||||
# Format generator appropriately
|
||||
if generator is not None:
|
||||
generator = '-G "{gen}"'.format(gen=generator)
|
||||
|
||||
with CurrentWorkingDirectory(buildDir):
|
||||
Run('cmake '
|
||||
'-DCMAKE_INSTALL_PREFIX="{instDir}" '
|
||||
@ -239,9 +255,8 @@ def RunCMake(context, force, extraArgs = None):
|
||||
osx_rpath=(osx_rpath or ""),
|
||||
generator=(generator or ""),
|
||||
extraArgs=(" ".join(extraArgs) if extraArgs else "")))
|
||||
Run("cmake --build . --config Release --target install -- {multiproc}"
|
||||
.format(multiproc=("/M:{procs}" if Windows() else "-j{procs}")
|
||||
.format(procs=context.numJobs)))
|
||||
Run("cmake --build . --config Release --target install -- {jobs}"
|
||||
.format(jobs=multiproc))
|
||||
|
||||
def PatchFile(filename, patches):
|
||||
"""Applies patches to the specified file. patches is a list of tuples
|
||||
|
Loading…
Reference in New Issue
Block a user