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.
I tried generating into the ${CMAKE_CURRENT_SOURCE}/include/nanogui, which will
work for Makefiles but not for Ninja.
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.
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.
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.
-Stephen
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake