Proposal: target_source_group
I currently have this module in my project:
include_guard()
# Make sure to call this function near the end of the respective targets CMakeLists.txt
function(source_group_target target root)
# Display the folders directory structure in IDEs
# If this isn't done then you just get generic Header/Source Files filters
get_target_property(sources ${target} SOURCES)
source_group(TREE ${root}
FILES ${sources}
)
endfunction()
This is because I want to have nice IDE support for clients. I think cmake should streamline this process for clients.
target_source_group(<target> TREE <root> [PREFIX <prefix>] [FILES <src>...])
This function would automatically group the sources from the SOURCES property for the client, and basically accomplish the same thing as my helper function.
Or alternatively
source_group(TREE <root> [PREFIX <prefix>] [FILES <src>...] [TARGET <target>])