Skip to content

Commit

Permalink
Try onetbb/2020.3 to fix link issue on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanDugueperoux2 committed Oct 5, 2024
1 parent 181d728 commit f26c98b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions recipes/openusd/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, load, get, rm, rmdir
from conan.tools.scm import Version
import os

Expand Down Expand Up @@ -117,13 +117,15 @@ def configure(self):
# Set same options as in https://github.com/PixarAnimationStudios/OpenUSD/blob/release/build_scripts/build_usd.py#L1397
# self.options["opensubdiv/*"].with_tbb = True
self.options["opensubdiv/*"].with_opengl = self.options.enable_gl_support and not is_apple_os(self)
# FIXME: provokes a missing binary error on conan center
self.options["opensubdiv/*"].with_metal = is_apple_os(self)

def layout(self):
cmake_layout(self, src_folder="src")

def requirements(self):
if self.options.enable_python_support:
self.requires("boost/1.84.0")
self.requires("boost/1.86.0")
# openusd doesn't support yet recent release of onetbb, see https://github.com/PixarAnimationStudios/OpenUSD/issues/1471
self.requires("onetbb/2021.10.0", transitive_headers=True)

Expand Down Expand Up @@ -171,7 +173,8 @@ def validate(self):
raise ConanInvalidConfiguration(
f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support."
)
if is_apple_os(self) and not self.dependencies["opensubdiv"].options["with_metal"]:
# if is_apple_os(self) and not self.dependencies["opensubdiv"].options["with_metal"]:
if is_apple_os(self):
raise ConanInvalidConfiguration(f'{self.ref} needs -o="opensubdiv/*:with_metal=True"')
if self.options.build_animx_tests:
raise ConanInvalidConfiguration("animx recipe doesn't yet exists in conan center index")
Expand Down Expand Up @@ -253,6 +256,12 @@ def generate(self):

tc.generate()

self.output.info("Content of conan_toolchain.cmake")
self.output.info(str(self.build_folder))
conan_toolchain = load(self, os.path.join(self.build_folder, "generators", "conan_toolchain.cmake"))
self.output.info(str(conan_toolchain))
self.output.info("End of conan_toolchain.cmake")

tc = CMakeDeps(self)
if self.options.enable_materialx_support:
tc.set_property("materialx::MaterialXCore", "cmake_target_name", "MaterialXCore")
Expand Down

0 comments on commit f26c98b

Please sign in to comment.