<div dir="ltr">I recommend going with the custom target / custom command route.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 27, 2018 at 5:19 AM, Stephen McDowell <span dir="ltr"><<a href="mailto:sjm324@cornell.edu" target="_blank">sjm324@cornell.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Upon further inspection, it seems more related to PRE_BUILD. The step to generating the files is through a add_custom_command call, which from the docs apparently may end up being PRE_LINK.<br>
<br>
I tried generating into the ${CMAKE_CURRENT_SOURCE}/<wbr>include/nanogui, which will work for Makefiles but not for Ninja.<br>
<br>
So it seems that maybe this is not a pathing issue at all, but instead an order of operations issue. If the Ninja generator ends up having this as PRE_LINK, the files haven’t been generated yet.<br>
<br>
That doesn’t quite explain why it worked previously, but perhaps the original setup was inherently flawed by relying on PRE_BUILD which is not a guaranteed order.<br>
<br>
Does anybody have thoughts on how to change things? The files cannot be compiled on their own, but maybe I should instead create a fake target and make it a dependency of the real (object) library that needs them. I keep messing that up, but this seems the most promising.<br>
<br>
-Stephen<br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/<wbr>listinfo/cmake</a><br>
</blockquote></div><br></div>