<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class="">I have looked around and seen a few issues discussing this, but have not seen any solutions.</div><div class=""><br class=""></div><div class="">It seems related to this: <a href="https://gitlab.kitware.com/cmake/cmake/issues/17450" class="">https://gitlab.kitware.com/cmake/cmake/issues/17450</a></div><div class=""><br class=""></div><div class="">In the sense that absolute paths are desired.</div><div class=""><br class=""></div><div class=""><div class="">1. Previously, we were generating a file called `${CMAKE_CURRENT_BINARY_DIR}/nanogui_resources.h` and performing `include_directories(${CMAKE_CURRENT_BINARY_DIR})`.</div><div class=""><br class=""></div><div class=""> This **works correctly**.</div><div class=""><br class=""></div><div class="">2. The setup was changed to generate the file `${CMAKE_CURRENT_BINARY_DIR}/nanogui/resources.h`. That is, the introduction of a new folder `nanogui`. With the same `include_directories(${CMAKE_CURRENT_BINARY_DIR})`, there is now a failure being unable to find `<nanogui/resources.h>`.</div><div class=""><br class=""></div><div class=""> Strangely, building with `ninja || ninja` (just building again after first failure) will succeed.</div><div class=""><br class=""></div><div class="">I was reading this discussion: <a href="https://public.kitware.com/pipermail/cmake-developers/2013-March/018398.html" class="">https://public.kitware.com/pipermail/cmake-developers/2013-March/018398.html</a></div><div class=""><br class=""></div><div class="">and the underlying cause seems to be the that Ninja wants relative paths.</div></div><div class=""><br class=""></div><div class="">Why is creating this sub-directory causing this issue? Is there a way to keep generating ${CMAKE_CURRENT_BINARY_DIR}/nanogui and be able to include it with Ninja? I tried forcing a add_definitions(-I${CMAKE_CURRENT_BINARY_DIR}) just for shiggles, but that resulted in the same scenario. So it seems like I need a way to force a verbatim include path “after” the Ninja generator makes things relative?</div><div class=""><br class=""></div><div class="">Reverting to the old version is not ideal, since it creates installation problems (the reason the subdirectory nanogui was created).</div><div class=""><br class=""></div><div class="">Thank you for any advice!</div><div class=""><br class=""></div><div class="">-Stephen</div><div class=""><br class=""></div><div class="">P.S. This is with CMake 3.11.1 and ninja 1.8.2 if it matters.</div><div class=""><br class=""></div></body></html>