PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
5.51k stars 1.14k forks source link

Does anyone have successed in compiling USD with cmake in mac? #1124

Closed wzy88111 closed 3 years ago

wzy88111 commented 4 years ago

the following is my problems: Does someone meet?

Configuring done CMake Error in pxr/base/tf/CMakeLists.txt: Target "tf" INTERFACE_INCLUDE_DIRECTORIES property contains path:

"/Users/wuzhaoyang1/work/3rdParty/USD/USD-master/build/include"

which is prefixed in the source directory.

CMake Error in pxr/base/tf/CMakeLists.txt: Target "tf" INTERFACE_INCLUDE_DIRECTORIES property contains path:

"/Users/wuzhaoyang1/work/3rdParty/USD/USD-master/build/include"

which is prefixed in the source directory.

CMake Error in pxr/base/js/CMakeLists.txt: Target "js" INTERFACE_INCLUDE_DIRECTORIES property contains path:

"/Users/wuzhaoyang1/work/3rdParty/USD/USD-master/build/include"

which is prefixed in the source directory.

CMake Error in pxr/base/trace/CMakeLists.txt: Target "trace" INTERFACE_INCLUDE_DIRECTORIES property contains path:

"/Users/wuzhaoyang1/work/3rdParty/USD/USD-master/build/include"

which is prefixed in the source directory.

moddyz commented 4 years ago

@wzy88111 Have you tried building via the script provided in the repo: build_scripts/build_usd.py.

meshula commented 4 years ago

It's a good idea to start with the build script as @moddyz says in order to get an idea of how the configuration is typically structured. The error you've reported typically means cmake is confused about the way your build and install directories have been configured.

jilliene commented 4 years ago

Filed as internal issue #USD-5888

wzy88111 commented 4 years ago

@wzy88111 Have you tried building via the script provided in the repo: build_scripts/build_usd.py.

I successed with the tool of build_usd.py by python, but i want to compile xcode project with cmake,then i want to read the source code, when i do ,it failed.

wzy88111 commented 4 years ago

It's a good idea to start with the build script as @moddyz says in order to get an idea of how the configuration is typically structured. The error you've reported typically means cmake is confused about the way your build and install directories have been configured.

I have succeed in compiling the usd code with CMake by fix several cmakelist.txt , but when compiling , there is still some errors

alelordelo commented 4 years ago

@wzy88111 Have you tried building via the script provided in the repo: build_scripts/build_usd.py.

I successed with the tool of build_usd.py by python, but i want to compile xcode project with cmake,then i want to read the source code, when i do ,it failed.

Would you mind sharing your workflow? I cannot get it to build on macOS Catalina... https://github.com/PixarAnimationStudios/USD/issues/1206

meshula commented 4 years ago

How about this?

https://github.com/vfxpro99/usd-build-club/wiki/MacOS,-using-Pixar's-script

alelordelo commented 4 years ago

How about this?

https://github.com/vfxpro99/usd-build-club/wiki/MacOS,-using-Pixar's-script

thanks @meshula , followed step by step. Posted on the other issue https://github.com/PixarAnimationStudios/USD/issues/1206

johndpope commented 4 years ago

so there's more build options here https://github.com/vfxpro99/usd-build-club/wiki/USD-on-macOS

UPDATE - mac /windows / linux prebuilt binaries here
https://github.com/Autodesk/maya-usd/releases/

NVIDIA

https://developer.nvidia.com/usd

disini commented 3 months ago

It's a good idea to start with the build script as @moddyz says in order to get an idea of how the configuration is typically structured. The error you've reported typically means cmake is confused about the way your build and install directories have been configured.

I have succeed in compiling the usd code with CMake by fix several cmakelist.txt , but when compiling , there is still some errors


CMake Error in pxr/base/tf/CMakeLists.txt:
  Target "tf" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/media/liusheng/Programs/Programs/libs/OpenUSD/PixarAnimationStudios/master/OpenUSD/third_party/oneTBB/tbb-2020.3-linux/tbb/include"

  which is prefixed in the source directory.

CMake Error in pxr/base/trace/CMakeLists.txt:
  Target "trace" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/media/liusheng/Programs/Programs/libs/OpenUSD/PixarAnimationStudios/master/OpenUSD/third_party/oneTBB/tbb-2020.3-linux/tbb/include"

  which is prefixed in the source directory.

CMake Error in pxr/base/work/CMakeLists.txt:
  Target "work" INTERFACE_INCLUDE_DIRECTORIES property contains path:

hello, I have the same problem on the cmake stage, how did you fix that ? Much appreciated!

wzy88111 commented 3 months ago

您发给我的信件已经收到。谢谢!祝您生活愉快!                              吴朝阳

meshula commented 3 months ago

@disini, are you doing an in source build? If so, can you try building OpenUSD to a location that is not in the source tree?

disini commented 3 months ago

@disini, are you doing an in source build? If so, can you try building OpenUSD to a location that is not in the source tree?

hello @meshula , the OpenUSD repository was not built in any other project as a third party, I did building the OpenUSD's own source code and project independently, the only change of this project is I put the oneTBB 2020.3 source code into the "third_party" sub-directory under the OpenUSD's source tree,

as suggested by @sunyab
https://github.com/PixarAnimationStudios/OpenUSD/issues/2964#issuecomment-1959803763

is there something wrong for doing this?

meshula commented 3 months ago

Nothing wrong, I was specifically looking for clues about the error message ... prefixed in the source directory.

disini commented 3 months ago

Nothing wrong, I was specifically looking for clues about the error message ... prefixed in the source directory.

Thanks so much!