From 4243372e02047ee5ba79457195de385052d74444 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Wed, 27 May 2026 08:47:46 +0200 Subject: [PATCH 1/2] Implement macOS system requirements for libomp Add system requirements for macOS to install libomp. --- conanfile.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/conanfile.py b/conanfile.py index 8642252..6c11bcd 100644 --- a/conanfile.py +++ b/conanfile.py @@ -72,9 +72,12 @@ def configure(self): pass def system_requirements(self): - # May be needed for macOS or Linux - pass - + if os_info.is_macos: + installer = SystemPackageTool() + installer.install("libomp") + proc = subprocess.run("brew --prefix libomp", shell=True, capture_output=True) + subprocess.run(f"ln {proc.stdout.decode('UTF-8').strip()}/lib/libomp.dylib /usr/local/lib/libomp.dylib", shell=True) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -105,7 +108,12 @@ def generate(self): # Set some build options tc.variables["MV_UNITY_BUILD"] = "ON" - + + if os_info.is_macos: + proc = subprocess.run("brew --prefix libomp", shell=True, capture_output=True) + prefix_path = f"{proc.stdout.decode('UTF-8').strip()}" + tc.variables["OpenMP_ROOT"] = prefix_path + tc.generate() def _configure_cmake(self): @@ -156,4 +164,4 @@ def package_info(self): self.cpp_info.relwithdebinfo.includedirs = ["RelWithDebInfo/include", "RelWithDebInfo"] self.cpp_info.release.libdirs = ["Release/lib"] self.cpp_info.release.bindirs = ["Release/Plugins", "Release"] - self.cpp_info.release.includedirs = ["Release/include", "Release"] \ No newline at end of file + self.cpp_info.release.includedirs = ["Release/include", "Release"] From d0ef089c3e01f689e0f22bf3cc91c3dd9c27def1 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Wed, 27 May 2026 08:51:48 +0200 Subject: [PATCH 2/2] Add import for os_info and SystemPackageTool --- conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conanfile.py b/conanfile.py index 6c11bcd..747a9be 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,6 +1,7 @@ from conans import ConanFile from conan.tools.cmake import CMakeDeps, CMake, CMakeToolchain from conans.tools import save, load +from conans.tools import os_info, SystemPackageTool import os import shutil import pathlib