<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Dependencies in INTERFACE_LINK_LIBRARIES should be detected with find_dependency"
   href="https://bugs.llvm.org/show_bug.cgi?id=49508">49508</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Dependencies in INTERFACE_LINK_LIBRARIES should be detected with find_dependency
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>cmake
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mario@emmenlauer.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Currently `LLVMExports.cmake` contains `INTERFACE_LINK_LIBRARIES` with entries
like `"z;rt;dl;tinfo;-lpthread;m;LLVMDemangle"` for the LLVM Ubuntu packages.
This assumes that a user has library `z` and others available in a system
directory, which may not necessarily be the case.

Modern clean cmake policy suggests that library dependencies should be searched
with `find_dependency` (see
<a href="https://cmake.org/cmake/help/latest/module/CMakeFindDependencyMacro.html">https://cmake.org/cmake/help/latest/module/CMakeFindDependencyMacro.html</a>)
rather than hardcoded. This will allow to include paths in the search that a
user configured for the original main cmake project. I.e. it allows users to
say `cmake -DCMAKE_PREFIX_PATH=xxx`, to add a number of non-standard
directories to the search list.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>