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