Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -72,9 +73,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
Expand Down Expand Up @@ -105,7 +109,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):
Expand Down Expand Up @@ -156,4 +165,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"]
self.cpp_info.release.includedirs = ["Release/include", "Release"]
Loading