(context, force, buildArgs)
| 503 | OIIO_PACKAGE_NAME = "OpenImageIO" |
| 504 | |
| 505 | def InstallOpenImageIO(context, force, buildArgs): |
| 506 | with CurrentWorkingDirectory(DownloadURL(OIIO_URL, context, force)): |
| 507 | ApplyGitPatch(context, "OpenImageIO.patch") |
| 508 | |
| 509 | extraArgs = ['-DOIIO_BUILD_TOOLS=OFF', |
| 510 | '-DOIIO_BUILD_TESTS=OFF', |
| 511 | '-DBUILD_DOCS=OFF', |
| 512 | '-DUSE_PYTHON=OFF', |
| 513 | '-DSTOP_ON_WARNING=OFF', |
| 514 | '-DUSE_PTEX=OFF'] |
| 515 | |
| 516 | # Make sure to use boost installed by the build script and not any |
| 517 | # system installed boost |
| 518 | extraArgs.append('-DBoost_NO_BOOST_CMAKE=On') |
| 519 | extraArgs.append('-DBoost_NO_SYSTEM_PATHS=True') |
| 520 | |
| 521 | # Add on any user-specified extra arguments. |
| 522 | extraArgs += buildArgs |
| 523 | |
| 524 | # OIIO's FindOpenEXR module circumvents CMake's normal library |
| 525 | # search order, which causes versions of OpenEXR installed in |
| 526 | # /usr/local or other hard-coded locations in the module to |
| 527 | # take precedence over the version we've built, which would |
| 528 | # normally be picked up when we specify CMAKE_PREFIX_PATH. |
| 529 | # This may lead to undefined symbol errors at build or runtime. |
| 530 | # So, we explicitly specify the OpenEXR we want to use here. |
| 531 | extraArgs.append('-DOPENEXR_ROOT="{}"'.format( |
| 532 | os.path.join(context.externalsInstDir, OPENEXR_INSTALL_FOLDER))) |
| 533 | |
| 534 | tbbConfigs = { |
| 535 | "Debug": '-DTBB_USE_DEBUG_BUILD=ON', |
| 536 | "Release": '-DTBB_USE_DEBUG_BUILD=OFF', |
| 537 | "RelWithDebInfo": '-DTBB_USE_DEBUG_BUILD=OFF', |
| 538 | } |
| 539 | |
| 540 | RunCMake(context, True, OIIO_INSTALL_FOLDER, extraArgs, configExtraArgs=tbbConfigs) |
| 541 | |
| 542 | OPENIMAGEIO = Dependency(OIIO_INSTALL_FOLDER, OIIO_PACKAGE_NAME, InstallOpenImageIO, OIIO_URL, "include/OpenImageIO/oiioversion.h") |
| 543 |
nothing calls this directly
no test coverage detected