The current approach of defining a hex manually in the CMakeLists.txt file has a few issues:
- A hex value is not very readable for developers
- For the EXCLUDE_DEPRECATED_BEFORE_AND_AT value we define a tripel when configuring the project. Having to switch between the tripel and hex notations is confusing
- Projects that don't require the latest KF5 master often define both the KF5_MIN_VERSION and the KF_DISABLE_DEPRECATED_BEFORE_AND_AT value, with a comment of keeping them in sync. Better would be to be able to reuse the KF5_MIN_VERSION value for the KF_DISABLE_DEPRECATED_BEFORE_AND_AT value.
- The value can not get changed when configuring the project, the CMakeLists.txt file needs to be edited.
A better solution would be a function in ECM (ecm_set_deprecation_versions), which accepts multiple key-value pairs of the base name (like QT, KF, KSERVICE) and then compile definition with the given version. The version should be overwritten using a CMake definition when configuring the project.