20 lines
647 B
CMake
20 lines
647 B
CMake
|
function(setup_msvc_grouping)
|
||
|
get_property(FG_GROUPS_C GLOBAL PROPERTY FG_GROUPS_C)
|
||
|
string(REPLACE "@" ";" groups ${FG_GROUPS_C} )
|
||
|
foreach(g ${groups})
|
||
|
string(REPLACE "#" ";" g2 ${g})
|
||
|
list(GET g2 0 name)
|
||
|
list(REMOVE_AT g2 0)
|
||
|
source_group("${name}\\Sources" FILES ${g2})
|
||
|
endforeach()
|
||
|
|
||
|
get_property(FG_GROUPS_H GLOBAL PROPERTY FG_GROUPS_H)
|
||
|
string(REPLACE "@" ";" groups ${FG_GROUPS_H} )
|
||
|
foreach(g ${groups})
|
||
|
string(REPLACE "#" ";" g2 ${g})
|
||
|
list(GET g2 0 name)
|
||
|
list(REMOVE_AT g2 0)
|
||
|
source_group("${name}\\Headers" FILES ${g2})
|
||
|
endforeach()
|
||
|
endfunction()
|