I’m starting my game engine exploration project this winter, and I want to be able to work on both my desktop, which runs Windows 10, and my MacBook. I’ll be primarily using my MacBook for a few weeks, but I want to target DirectX and Windows. Thus, I want to use a build manager to enable development in Visual Studio and Xcode. I’ve worked on a project that uses Premake to handle building project and solution files, and I’ve built open source programs from source using CMake. These seem to be the two most popular systems that are available to me, and each seems to have advantages and disadvantages. Since I haven’t built a project from scratch using either of these, I tried my best to do some research on which system I should use.
Here are some of the webpages I read:
- https://cmake.org/
- https://premake.github.io/
- https://www.allegro.cc/forums/thread/615046
- http://www.dharmab.com/programming/cpp/2014/06/02/cpp-build-systems.html
My Thoughts
- Premake
- Advantages
- Uses Lua scripting language, which I am familiar with.
- Disadvantages
- Doesn’t seem to be as easily customizable as CMake is.
- It seems generally less popular.
- Advantages
- CMake
- Advantages
- Gives me a chance to learn something that may be used professionally.
- Seems to be better supported.
- Possibly more customizable.
- Disadvantages
- It will probably take me longer to get started.
- Advantages
Since I want to get familiar with CMake, I’m going to try using it instead of Premake. However, if it starts giving me trouble, I will see if it is worth it to switch.
An upcoming issue that I’m anticipating is that I’ll have to figure out how I am going to abstract the platform layers from my engine layers. That will probably wait for after I get a basic entity-component structure down with some form of messaging and update loop.