So to my understanding Egoboo has 3 sub-projects (
cartman,
egolib,
game).
I would adjust the directory structure in a final step as follows:
Code: Select all
<root>
|
|__cartman
| |
| |__src
| |
| |__cartman
| |
| |
| <source files of cartman>
|___egolib
| |
| |__src
| |
| |___egolib
| |
| |
| <source files of egolib>
|
|_____game
| |
| |_src
| |
| |_____game
| |
| |
| <source files of game>
In that way, we have standard project/sub-project layout that is satisfied by most C/C++ projects. For instance, to use the sub-project
egolib from the sub-project
game, the path
egolib/src would have to be added to the inclusion paths of the sub-project
game.
I do think that the distinct advantage is that any developer can locate sub-projects and include them into his/her sub-project without worrying about inclusion paths in the source code. In that way, we can factor out common code from each sub-project and eventually split
egolib up if one would want to because it becomes trivial to add new sub-projects. It can be done by a few lines of CMake code.
For the matter of external dependencies:
I do not think the few dependencies are a problem under Linux (package manager for the win). I can not speak for Mac, though. Problematic - as always - is Windows as there is no standard pattern for acquiring, building and installing libraries. I do think, that CMake will not be of any aid here (in the end, this is a conceptual flaw of Windows or the lack of a concept under Windows:)). This is why I pick up the suggestion of just adding the libraries to the source code by creating a directory
which accomodates the dependencies for Windows. There are no license troubles (afaik, the Egoboo license is more terse than any of the licenses of the other projects). The beneficial effect of this approach can be illustrated on
Lua:
Lua does not provide Windows build files releases are not happening very often. So we augment the source code of
Lua by appropriate
CMake files and any user of Egoboo can build that dependency. If - like once a year -
Lua updates its source code, the Egoboo devs update their copy of
Lua in the repository. The other libraries -
SDL and so on - have slow release cycles (that is, they are quite mature), too, so this is a very viable approach.
Opinions?