From dc3f99fb1a1c3656c81d347d53cddce3b21cf56b Mon Sep 17 00:00:00 2001 From: scribam Date: Sat, 11 Nov 2023 15:19:59 +0100 Subject: [PATCH] cmake: create folder hierarchy only for Xcode or Visual Studio generators --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 70c6e8fff3..608485b82b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1818,5 +1818,7 @@ if(UNIX AND NOT APPLE AND NOT ANDROID AND NOT LIBRETRO) endforeach() endif() -file(GLOB_RECURSE SRC_FILES *.h *.cpp *.c *.cc *.mm) -source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SRC_FILES}) +if(${CMAKE_GENERATOR} MATCHES "^Xcode.*|^Visual Studio.*") + file(GLOB_RECURSE SRC_FILES *.h *.cpp *.c *.cc *.mm) + source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SRC_FILES}) +endif()