diff --git a/templates/cpp-template-default/CMakeLists.txt b/templates/cpp-template-default/CMakeLists.txt index 8a4a69fb27..82e88f6561 100644 --- a/templates/cpp-template-default/CMakeLists.txt +++ b/templates/cpp-template-default/CMakeLists.txt @@ -75,13 +75,12 @@ if(APPLE OR WINDOWS) endif() # add cross-platforms source files and header files -list(APPEND GAME_SOURCE - Classes/AppDelegate.cpp - Classes/HelloWorldScene.cpp +file(GLOB_RECURSE GAME_SOURCE + Classes/*.cpp ) -list(APPEND GAME_HEADER - Classes/AppDelegate.h - Classes/HelloWorldScene.h + +file(GLOB_RECURSE GAME_HEADER + Classes/*.h ) if(ANDROID)