1
0
Fork 0
flightgear/CMakeModules/SetupMSVCGrouping.cmake
Edward d'Auvergne 6a730b5820 CMake: The main sources/headers have been shifted into FG_{SOURCES,HEADERS}.
This allows the sources and headers in src/Main/ to be used by other targets.
They are grouped into the new "Main" flightgear component via the macro in the
FlightGearComponent CMake module.  The bootstrap.cxx file with its main function
has been separated out into a separate variable MAIN_SOURCE for use by the fgfs
binary.

All these files have therefore been removed from the test_suite CMakeLists.txt
file, as they are added via FG_SOURCES and FG_HEADERS.  The MSVC grouping code
also does not need to deal with the now deleted separate SOURCE and HEADER
variables for these files.
2018-04-05 21:06:02 +02:00

19 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()