)]}'
{
  "commit": "cb96abbf7affd986016f17dd09f9f971138a922b",
  "tree": "fac871d27b0c23ad3c45b4d9a521785a4f88f8e4",
  "parents": [
    "898ba64d2463bb70a2e21bf86c69dbc44ec9cd5f"
  ],
  "author": {
    "name": "Chad Versace",
    "email": "chad@kiwitree.net",
    "time": "Thu Apr 14 06:04:12 2022 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Apr 14 09:04:12 2022 -0400"
  },
  "message": "Fix CMake for librt (#4773)\n\nIn the installed file\r\n/usr/lib64/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake, occurences of\r\nlibrt in the INTERFACE_LINK_LIBRARIES property are incorrect.  The\r\nproperty contains the absolute path to librt. In most situations, this\r\nproduces no problem. But when building in a sysroot, which is commonly\r\ndone when cross-compiling, the absolute path breaks dependent projects.\r\n\r\nFor example, when building spirv-tools using the Chrome OS SDK, and\r\ntargeting the board \u0027volteer\u0027, where the build sysroot is\r\n\u0027/build/volteer\u0027, the file includes this line\r\n    INTERFACE_LINK_LIBRARIES \"/build/volteer/usr/lib64/librt.so\"\r\nwhen it should instead say\r\n    INTERFACE_LINK_LIBRARIES \"rt\"\r\n\r\nThe CMake documentation agrees [1]:\r\n    Note that it is not advisable to populate the\r\n    INTERFACE_LINK_LIBRARIES of a target with absolute paths to\r\n    dependencies. That would hard-code into installed packages the\r\n    library file paths for dependencies as found on the machine the\r\n    package was made on.\r\n\r\n[1] https://cmake.org/cmake/help/latest/prop_tgt/INTERFACE_LINK_LIBRARIES.html",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ab411737eb14ce6308aef1ce688faeddcf20af58",
      "old_mode": 33188,
      "old_path": "source/CMakeLists.txt",
      "new_id": "98559b8fe969b9153577b75de667779f15a39c7d",
      "new_mode": 33188,
      "new_path": "source/CMakeLists.txt"
    }
  ]
}
