Dear ROOTers,
I’m running into the same issue as described here.
Is the include_directories directive really necessary for root_generate_dictionary?
This kinda defeats the purpose of writing in modern CMake, it would be best if root_generate_dictionary checked the directories passed with the -I option or if it could somehow define a target onto which the user could call target_include_directories.
One typically generates dictionary together with some library.
Library target is specified via MODULE libtarget parameter of root_generate_dictionary macros.
If one need extra include paths for the dictionary - one just configures them for the library target like:
target_include_directories(libtarget PUBLIC /path/to/the/includes)
Hi Sergey,
this is exactly what I was looking for. I was already specifying a target via the MODULE option but I wasn’t aware that this set up the include_directories for the dictionary (in fact I was doing this before adding the includes to my target, but it looks like I should declare the dictionary generation after the library target).
Somehow I feel that this usage should be documented somewhere…