diff --git a/CMakeLists.txt b/CMakeLists.txt index 73978167..5e13c4d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,11 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() endif() +################################################################################ +# Use solution folders feature +################################################################################ +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + ################################################################################ # Global configuration types ################################################################################ @@ -185,6 +190,13 @@ list(FILTER ALL_FILES EXCLUDE REGEX "bin/eu/.*.c") list(FILTER ALL_FILES EXCLUDE REGEX "src/game/main.c") list(FILTER ALL_FILES EXCLUDE REGEX "src/pc/dlmalloc.c") +# Create source groups that match the real file directory paths +foreach(source IN LISTS ALL_FILES) + get_filename_component(source_path "${source}" PATH) + string(REPLACE "/" "\\" source_path_adjusted "${source_path}") + source_group("${source_path_adjusted}" FILES "${source}") +endforeach() + if (CMAKE_SYSTEM_NAME STREQUAL "iOS") set(IOS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libultraship/ios)