Me and some buddies are trying to construct a game engine that can run multiple games in c++. The games are similar enough that they all share similar mechanics and interfaces that I want to make some files that apply to each game. Many of the source files will be the same like our GUI's or Game Engine files. However, some files that deal with individual game mechanics will change from game to game. If this expands to a large library, I don't want to simply include every file from every library to play one game. I also don't want to have a duplicate of GUI and game engine files in every folder in the library.
I am currently thinking about the idea of a launcher that will change the #include tags to match the choice made by the launcher, although this may require recompiling. Is there a way to make this/ is it a good technique, or is their a better way. (keep in mind i'd prefer int main to remain in game engine/ a shared file, and not make a main for each game)