-
Notifications
You must be signed in to change notification settings - Fork 4
Description
This is an overview task.
What is CMake
CMake is Wrapland's build system. It manages building, installing and exporting Wrapland's libraries.
CMake is probably the most used build system for C++ projects. It is feature-rich but also pretty complicated with unusual syntax. For an introduction read:
- First Pablo Arias: It's time to do CMake right to get you motivated.
- An Introduction to Modern CMake for more guidance.
Current state
Missing documentation for ECM
We inherited usage of extra-cmake-modules (ECM) from KWayland. These are well contained but sadly not well documented. When looking for information to generate coverage reports for #61 I did not find any useful information besides some module that basically does nothing.
Because of the missing documentation ECM is rather opaque with an all-or-nothing approach heavily focused on KDE frameworks needs. For other projects it is difficult to understand in full and to assess how suited ECM is in the end.
Looking online we can find projects with way better documentation that also promise to use modern CMake. See above introduction articles and following projects or additional information:
Issues
- Install paths are not capitalized consistently.
- Installed headers are not clickable in Qt Creator (maybe only an issue on my system?).
Next tasks
We want a simple and robust CMake build system using modern CMake paradigms and most recent CMake features. For that let's define some direct tasks.
- cmake-format reformats CMake files like clang-format does for code. Add it to CI. Apply cmake-format to CMake files #81
- CMake 3.16 supports precompiled headers. Make use of this feature. See this article for more info.
- Use CMake 3.8 meta-compiler features instead of setting variables as explained here.
- Set project version in call to
project(). - Use either
Wrapland::orWraplandServer::+WraplandClient::namespaces. For reasoning about this see here.