Skip to content

pxrTargets.cmake contains absolute build paths #1025

@mistafunk

Description

@mistafunk

Description of Issue

After make install USD, cmake/pxrTargets.cmake unexpectedly contains absolute paths. In an consuming cmake script, find_package(pxr CONFIG ...) fails with:

CMake Error in usd/CMakeLists.txt:
   Imported target "tf" includes non-existent path
    "/xxx/boost-xxx/include"
   in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
   * The path was deleted, renamed, or moved to another location.
   * An install or uninstall procedure did not complete successfully.
   * The installation package was faulty and references files it does not provide.

"/xxx/boost-xxx/include" is an absolute path to the boost include directory on our build server which obviously does not exist anymore when consuming USD in a downstream build system.

Steps to Reproduce

  1. Setup cmake to build USD static libraries:
   -DBUILD_SHARED_LIBS=0
   -DPXR_BUILD_MONOLITHIC=0
   -DPXR_ENABLE_PYTHON_SUPPORT=0
   -DPXR_BUILD_IMAGING=0
   -DPXR_BUILD_TESTS=0
   -DBOOST_ROOT=xxx
   -DBoost_DEBUG=1
   -DBoost_NO_SYSTEM_PATHS=1
   -DBoost_ADDITIONAL_VERSIONS="1.71.1;1.71.0;1.71"
   -DTBB_LIBRARY=xxx -DTBB_tbb_LIBRARY=xxx -DTBB_INCLUDE_DIR=xxx
   -DOPENEXR_LOCATION=xxx
   -DGLEW_LOCATION=xxx
   -DCMAKE_INSTALL_PREFIX=xxx
   -DCMAKE_BUILD_TYPE=Debug
   -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0"
   /path/to/USD-19.11
  1. ninja install
  2. Try to consume the pxr target with find_package

System Information (OS, Hardware)

CentOS 7.6

Package Versions

USD 19.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildBuild-related issue/PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions