cpichard / usdtweak

Universal Scene Description standalone editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Macbook M1 - build error

alelordelo opened this issue · comments

Thanks for sharing this amazing project!

I tried compiling on Macbook M1 but got this error... Haas anyone managed to complete on Mac M1?

-MacBook-Air build % cmake -Dpxr_DIR=/installs/usd-22.05 ..

-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenGL: /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/OpenGL.framework
CMake Error at CMakeLists.txt:5 (find_package):
By not providing "Findpxr.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "pxr", but
CMake did not find one.

Could not find a package configuration file provided by "pxr" with any of
the following names:

pxrConfig.cmake
pxr-config.cmake

Add the installation prefix of "pxr" to CMAKE_PREFIX_PATH or set "pxr_DIR"
to a directory containing one of the above files. If "pxr" provides a
separate development package or SDK, be sure it has been installed.

Hi @alelordelo ,
Thanks for trying this project !
It does compile on mac m1 and the realtime renderer storm is also working if you use usd 22.08.
Regarding your error, when you launch cmake you have to replace /installs/usd-22.05 with the path pointing to your version of usd. Let's say you installed usd in /Users/alelordelo/usd-22.05 then the cmake command becomes:

cmake -Dpxr_DIR=/Users/alelordelo/usd-22.05 ..

Another thing to take into account is that the cpu architecture is different on m1. Depending on how you compiled usd, you'll probably have to use the x86_64 architecture by prefixing the arch -x86_64 to the cmake command:

arch -x86_64 cmake -Dpxr_DIR=/where/you/installed/usd ..

I hope that helps, don't hesitate if you have any questions.

C