Hi!

I am a seasoned Cmake user but cannot solve a fairly simple problem, so I might 
be mistaking the forest for the trees.

I have a project in which there is a custom_command/custom_target pair that 
creates a header file as part of a (currently) header-only target. I want to 
create an imported target (or really, any kind of target), which is responsible 
for triggering header generation at build time AND relaying the include 
directory so consumers need not worry about the location where the generated 
header files go. My problem is:

- I cannot invoke target_include_directories on a custom_target
- Imported targets cannot have source files (for proper depending on the result 
header file)
- Imported targets cannot link to a custom_target
- Interface and Unkown libraries cannot be non-imported
- All other library types result in objects/libraries (which I don’t need)

How can I create the dependency graph where my custom_command is invoked if the 
inputs to it change (or if its output doesn’t exist yet) and depending targets 
are rebuilt accordingly AND I also inherit build properties (include 
directories)?

Cheers,
Máté
-- 

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

Reply via email to