I am working on a project that is based on the merged header placement (headers, sources and tests are in the same directory). I would like to link another directory to this, however using the target_include_directory will include the private header files as well. I am wondering how can i exclude certain headers file from being accessible by libraries that are linked to my current target
I have tried to read through the documents of cmake and seems that i am not able to achieve this quite easily. I am quite new to cmake so sorry if this is a trivial question. I have also searched for example of this structure in github and could not find any example project.
The reason I did not choose the separate structure is that the current project i am working on is very modularized. There are many nested subdirectories 5-6 level and having the project structure repeated 3 time in src test and include was very annoying to navigate. That is why we have switched to the merged header placement structure to have only a single nested directory.