<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 17, 2018 at 11:15 AM, Daniel Wyatt <span dir="ltr"><<a href="mailto:daniel.wyatt@gmail.com" target="_blank">daniel.wyatt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Is there a way to determine this directory?</div><div><br></div><div>Right now I have something like:</div><div>${CMAKE_INSTALL_LIBDIR}/cmake/<wbr><project-name>/something-<wbr>version.cmake</div><div><br></div><div>On CentOS 7 w/cmake3, however, this should be /usr/lib/cmake3/...</div><div><br></div><div>Obviously I can just check to see if this directory exists and then fall back,</div><div>but I'm wondering if there is a bultin variable to retrieve this (I've looked, but no luck so far).</div></div></blockquote></div><br>CMake does not require one specific location, it searches quite a few locations. It is up to the project where it installs to, but I'd normally recommend the place you are already using (<font face="monospace, monospace">${CMAKE_INSTALL_LIBDIR}/cmake/<wbr><project-name>/</font>). Have a look here for the full list (scroll down to the list of directories starting with <font face="monospace, monospace"><prefix>/...</font>):</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="https://cmake.org/cmake/help/latest/command/find_package.html">https://cmake.org/cmake/help/latest/command/find_package.html</a></div><div class="gmail_extra"><br></div><div class="gmail_extra">The only thing I could find that referred to a .../cmake3/ location was the cmake3 package from epel, which I assume they do to avoid clashing with the default cmake package. Personally, I'd consider that to be wrong behavior though since CMake won't be searching that location by default (unless they patched their cmake3 executable to search there as well, but still it's not ideal).</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div></div></div></div></div></div></div>
</div></div>