Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling from sources mac hardware (M1 / M2) #57

Open
EloiGattet opened this issue Apr 20, 2023 · 0 comments
Open

Compiling from sources mac hardware (M1 / M2) #57

EloiGattet opened this issue Apr 20, 2023 · 0 comments

Comments

@EloiGattet
Copy link

Hi!
I had an issue on my Mac with an M2 processor when trying to use the precompiled binaries relight-cli and relight-merge from the latest version. When trying to compile from the sources, Cmake couldn't find libomp, so I had to install it using the command brew install libomp. Then I modified the cmakelists file by adding the following elements, and everything worked well!

if (APPLE)
  set(OpenMP_C "/opt/homebrew/opt/libomp/lib/libomp.dylib")
  set(OpenMP_CXX "/opt/homebrew/opt/libomp/lib/libomp.dylib")
  set(OpenMP_C_INCLUDE_PATHS "/opt/homebrew/opt/libomp/include")
  set(OpenMP_CXX_INCLUDE_PATHS "/opt/homebrew/opt/libomp/include")
  set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include")
  set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include")
  set(OpenMP_C_LIB_NAMES "omp")
  set(OpenMP_CXX_LIB_NAMES "omp")
  set(OpenMP_omp_LIBRARY "/opt/homebrew/opt/libomp/lib/libomp.dylib")
endif()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant