> Hm, it's the same info I've already found in other places. > Unfortunately, I still don't see a way to generate a source file that > should be #include'd instead of linked into an executable.
I missed that you wanted a .h file that other libraries would pick up. Since CMake isn't aware of which header files a library #includes, you're not getting that dependency information which I guess is what you're running into. I haven't needed to do it myself, but have you tried setting your generated header file in the SOURCES property of your library PUBLICly (or possibly INTERFACE). CMake knows the custom command that OUTPUTs a file, so when it tracks the file it should know the dependency to make it happen. By exporting the header it should convey the dependency to the consumer(s).
-- 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: http://public.kitware.com/mailman/listinfo/cmake
