I will try to explain my problem abstractly:
I have a huge project, that compiles a lot of cpp files. Some of them do need special treatment after the build.
(My case: the need to be installed to a special folder and doxygen generation over these files)
They can be distinguished by individual properties
(My case: special folder name)
How do i do this?
I am thinking of a hook in add_library (etc.), that run (pseudo code):
foreach(SOURCE in SOURCES)
if(hasProperty(FILE))
doSomething(FILE)
I guess i have to do the Hook myself by overloading add_library(). Am I correct? is there another way to do this? Maybe:
foreach(TARGET)
SOURCES = get_properties(TARGET SOURCES)
foreach(SOURCE in SOURCES)
...
(Using this CMake List of all Project Targets - #5 by developer)
Or is this like bad practice and I should do:
target_do_special(TARGET)
for each and every target?